Click here to Skip to main content
15,886,034 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionAutomating a website using Asp.net Pin
srikrishnathanthri3-Jul-16 23:56
srikrishnathanthri3-Jul-16 23:56 
AnswerRe: Automating a website using Asp.net Pin
Member 1039877314-Jul-16 21:40
Member 1039877314-Jul-16 21:40 
QuestionWeb api insert failed but code seems fine Pin
DotNetFellow1-Jul-16 19:14
DotNetFellow1-Jul-16 19:14 
QuestionRadiobuttonlist choice disables requiredfieldvalidator in textboxes and other radiobuttonlist Pin
Codeaddict742330-Jun-16 9:25
Codeaddict742330-Jun-16 9:25 
QuestionRe: Radiobuttonlist choice disables requiredfieldvalidator in textboxes and other radiobuttonlist Pin
ZurdoDev30-Jun-16 10:28
professionalZurdoDev30-Jun-16 10:28 
AnswerRe: Radiobuttonlist choice disables requiredfieldvalidator in textboxes and other radiobuttonlist Pin
Codeaddict742330-Jun-16 10:35
Codeaddict742330-Jun-16 10:35 
GeneralRe: Radiobuttonlist choice disables requiredfieldvalidator in textboxes and other radiobuttonlist Pin
Richard Deeming30-Jun-16 10:52
mveRichard Deeming30-Jun-16 10:52 
GeneralRe: Radiobuttonlist choice disables requiredfieldvalidator in textboxes and other radiobuttonlist Pin
Codeaddict742330-Jun-16 11:16
Codeaddict742330-Jun-16 11:16 
C#
Richard,
 
Thank you for the quick reply.
 
I added the curly  brackets as you suggested but I still get an error msg on the 'else' statement
 
My code behind is as follows now:
--------------

 
protected void rbCurrentlyEmployed_SelectedIndexChanged(object sender, EventArgs e)
 
 



 {

 
 if (rbCurrentlyEmployed.SelectedValue == "No" || rbCurrentlyEmployed.SelectedValue == "Retired" ) 

 ((RequiredFieldValidator)txtEmployer.FindControl("RFV_Employment_Employer")).Enabled = false;

 ((RequiredFieldValidator)txtJobTitle.FindControl("RFV_Employment_JobTitle")).Enabled = false;

 ((RequiredFieldValidator)txtWorkPhone.FindControl("RFV_Employment_WorkPhone")).Enabled = false;

 ((RequiredFieldValidator)rbgrantsmatchingfunds.FindControl("RFV_Employment_MatchingFunds")).Enabled = false;
 
 

 }

 
 else

 
 
 {

 
 ((RequiredFieldValidator)txtEmployer.FindControl("RFV_Employment_Employer")).Enabled = true;

 ((RequiredFieldValidator)txtJobTitle.FindControl("RFV_Employment_JobTitle")).Enabled = true;

 ((RequiredFieldValidator)txtWorkPhone.FindControl("RFV_Employment_WorkPhone")).Enabled = true;

 ((RequiredFieldValidator)rbgrantsmatchingfunds.FindControl("RFV_Employment_MatchingFunds")).Enabled = true;
 
 

 }
 --------------------
After the textboxes, Visual Studio 12 indicates that the textboxes are a 'field' and are being used as a 'type'
 

ANY help would be greatly appreciated...

GeneralRe: Radiobuttonlist choice disables requiredfieldvalidator in textboxes and other radiobuttonlist Pin
Richard MacCutchan30-Jun-16 22:26
mveRichard MacCutchan30-Jun-16 22:26 
QuestionAngularjs is not refreshing data on the CSHTML page Pin
indian14330-Jun-16 2:39
indian14330-Jun-16 2:39 
AnswerRe: Angularjs is not refreshing data on the CSHTML page Pin
John C Rayan30-Jun-16 21:24
professionalJohn C Rayan30-Jun-16 21:24 
GeneralRe: Angularjs is not refreshing data on the CSHTML page Pin
indian1431-Jul-16 0:40
indian1431-Jul-16 0:40 
GeneralRe: Angularjs is not refreshing data on the CSHTML page Pin
John C Rayan1-Jul-16 1:18
professionalJohn C Rayan1-Jul-16 1:18 
GeneralRe: Angularjs is not refreshing data on the CSHTML page Pin
indian1431-Jul-16 4:15
indian1431-Jul-16 4:15 
GeneralRe: Angularjs is not refreshing data on the CSHTML page Pin
John C Rayan4-Jul-16 0:22
professionalJohn C Rayan4-Jul-16 0:22 
QuestionWhen to use ASP.NET Webforms, MVC, Web API Pin
larsp77729-Jun-16 0:04
larsp77729-Jun-16 0:04 
AnswerRe: When to use ASP.NET Webforms, MVC, Web API Pin
F-ES Sitecore30-Jun-16 1:03
professionalF-ES Sitecore30-Jun-16 1:03 
GeneralRe: When to use ASP.NET Webforms, MVC, Web API Pin
larsp77730-Jun-16 1:37
larsp77730-Jun-16 1:37 
GeneralRe: When to use ASP.NET Webforms, MVC, Web API Pin
F-ES Sitecore30-Jun-16 2:12
professionalF-ES Sitecore30-Jun-16 2:12 
GeneralRe: When to use ASP.NET Webforms, MVC, Web API Pin
larsp77730-Jun-16 2:22
larsp77730-Jun-16 2:22 
GeneralRe: When to use ASP.NET Webforms, MVC, Web API Pin
F-ES Sitecore30-Jun-16 3:02
professionalF-ES Sitecore30-Jun-16 3:02 
GeneralRe: When to use ASP.NET Webforms, MVC, Web API Pin
larsp77730-Jun-16 3:13
larsp77730-Jun-16 3:13 
GeneralRe: When to use ASP.NET Webforms, MVC, Web API Pin
Ronald.A11-Jul-16 4:05
Ronald.A11-Jul-16 4:05 
GeneralRe: When to use ASP.NET Webforms, MVC, Web API Pin
Ronald.A11-Jul-16 3:47
Ronald.A11-Jul-16 3:47 
GeneralRe: When to use ASP.NET Webforms, MVC, Web API Pin
larsp77711-Jul-16 3:56
larsp77711-Jul-16 3:56 

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.