Click here to Skip to main content
15,851,701 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionASP.Net MVC: How unauthorize access redirect user to login page Pin
Mou_kol10-Aug-22 21:27
Mou_kol10-Aug-22 21:27 
AnswerRe: ASP.Net MVC: How unauthorize access redirect user to login page Pin
Richard Deeming10-Aug-22 22:58
mveRichard Deeming10-Aug-22 22:58 
GeneralRe: ASP.Net MVC: How unauthorize access redirect user to login page Pin
Mou_kol11-Aug-22 2:06
Mou_kol11-Aug-22 2:06 
GeneralRe: ASP.Net MVC: How unauthorize access redirect user to login page Pin
Richard Deeming11-Aug-22 3:09
mveRichard Deeming11-Aug-22 3:09 
QuestionASP.Net MVC and querySelectorAll usage Pin
Mou_kol6-Aug-22 0:13
Mou_kol6-Aug-22 0:13 
AnswerRe: ASP.Net MVC and querySelectorAll usage Pin
Richard Deeming7-Aug-22 22:45
mveRichard Deeming7-Aug-22 22:45 
GeneralRe: ASP.Net MVC and querySelectorAll usage Pin
Mou_kol7-Aug-22 23:01
Mou_kol7-Aug-22 23:01 
QuestionVS2017 Code behind function to disable check Box on Combo Box Text Value Pin
Jason Parker 3335-Jul-22 23:57
Jason Parker 3335-Jul-22 23:57 
Hello,
Quick intro, My name is Jason and recently a work colleague retired and had developed several ASPX websites of which I have been tasked to support.
My previous background of programming is around Delphi, Intersystems Cache and more recently C# but these websites that I'm now supporting are all written in VB.net, asp.net, aspx or whatever language it is called, as you have probably guessed by now I have never used Visual Studio or produced code that created aspx files.

Anyway as a newbie to this language I have run into a problem that you experts will have learnt in school Smile | :)

I have a webpage (student.aspx) that contains this snippet of code :

ASP.NET
<asp:DropDownList runat="server" ID="ddlCourse" DataTextField="Course"
                  DataValueField="Course" DataSourceID="SDSCourse" 
                  Width="260px" onChange="CheckNerveCenter"/>


I have added the "onChange" bit

and this bit of code is also existing

<asp:CheckBox ID="chkNerveCentre" runat="server" Text="Nerve Centre" TextAlign="Left" />


So basically the page contains several combo boxes and several check boxes

I need to do some logic for 2 of them, code above.

If the combo box contains text (from database) with the word Nursing, Nurse, Nurses etc. lets say "*Nurs* then teh tick box needs to be disabled so it cannot be ticked

This is the code I have done in the code behind file student.aspx.vb, it just contains a comment now

Function CheckNerveCenter() As Object
    'If ID="ddlCourse" contains any word like "*Nurs*" then
    'uncheck ID="chkNerveCentre" and then disable ID="chkNerveCentre"
End Function


At first I tried to get it to display a message to show that it was calling the function from the "onChange" but it doesn't seem to work.

As I'm new to this language would you please just help a newbie in the right direction

I did try and use the OnChangeText in visual studio but it just kept showing me this error

"Property Value not valid","Error HRESULT E_FAIL has been returned from a call to a COM component." I have no idea what this means

That's why I decided to try and use a function of my own but now stuck

Any ideas please?

Jason

modified 7-Jul-22 7:31am.

AnswerRe: VS2017 Code behind function to disable check Box on Combo Box Text Value Pin
Richard Deeming7-Jul-22 3:14
mveRichard Deeming7-Jul-22 3:14 
Questionis there any code for capture screenshot and retrive system information in .net mvc core? Pin
Member 1568985228-Jun-22 1:23
Member 1568985228-Jun-22 1:23 
AnswerRe: is there any code for capture screenshot and retrive system information in .net mvc core? Pin
Richard Deeming28-Jun-22 2:00
mveRichard Deeming28-Jun-22 2:00 
Questionaspnet core use TempData error! Pin
Member 940386815-Jun-22 21:21
Member 940386815-Jun-22 21:21 
AnswerRe: aspnet core use TempData error! Pin
Richard Deeming15-Jun-22 22:20
mveRichard Deeming15-Jun-22 22:20 
AnswerRe: aspnet core use TempData error! Pin
Mycroft Holmes16-Jun-22 13:41
professionalMycroft Holmes16-Jun-22 13:41 
QuestionSELECT DISTINCT Pin
kjell.ek19-May-22 4:16
kjell.ek19-May-22 4:16 
AnswerRe: SELECT DISTINCT Pin
Ron Nicholson19-May-22 7:21
professionalRon Nicholson19-May-22 7:21 
AnswerRe: SELECT DISTINCT Pin
Member 1562749519-May-22 12:11
Member 1562749519-May-22 12:11 
GeneralRe: SELECT DISTINCT Pin
Richard Deeming19-May-22 22:42
mveRichard Deeming19-May-22 22:42 
GeneralRe: SELECT DISTINCT Pin
kjell.ek20-May-22 3:58
kjell.ek20-May-22 3:58 
GeneralRe: SELECT DISTINCT Pin
Alaren23-Jun-22 6:23
Alaren23-Jun-22 6:23 
QuestionMilliseconds from excel Pin
kjell.ek16-May-22 11:10
kjell.ek16-May-22 11:10 
AnswerRe: Milliseconds from excel Pin
Richard Deeming16-May-22 22:35
mveRichard Deeming16-May-22 22:35 
GeneralRe: Milliseconds from excel Pin
kjell.ek17-May-22 0:15
kjell.ek17-May-22 0:15 
AnswerRe: Milliseconds from excel Pin
Raj Kumar7918-Oct-22 6:12
Raj Kumar7918-Oct-22 6:12 
QuestionASP.NET Gridview load data Pin
Herman<T>.Instance28-Apr-22 4:16
Herman<T>.Instance28-Apr-22 4:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.