Click here to Skip to main content
15,895,740 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Image loupe Pin
Manas Bhardwaj28-Aug-09 5:18
professionalManas Bhardwaj28-Aug-09 5:18 
QuestionDynamically change color of xml sitemap titles Pin
compninja2528-Aug-09 3:59
compninja2528-Aug-09 3:59 
AnswerRe: Dynamically change color of xml sitemap titles Pin
compninja251-Sep-09 3:23
compninja251-Sep-09 3:23 
QuestionCustom validator Pin
diacoboss28-Aug-09 3:50
diacoboss28-Aug-09 3:50 
AnswerRe: Custom validator Pin
Manas Bhardwaj28-Aug-09 3:59
professionalManas Bhardwaj28-Aug-09 3:59 
GeneralRe: Custom validator Pin
diacoboss28-Aug-09 4:33
diacoboss28-Aug-09 4:33 
GeneralRe: Custom validator Pin
Coding C#28-Aug-09 4:54
Coding C#28-Aug-09 4:54 
AnswerRe: Custom validator Pin
compninja2528-Aug-09 8:26
compninja2528-Aug-09 8:26 

I've run into this issue before as well where I had a textbox hidden and the requiredfield validator would mess the form up. I'm not sure what it is exactly you are attempting to pull off, but I've found it easier in some cases to just build the controls instead of hiding. For example, if you are hiding a textbox until someone clicks a button and then showing it, try this instead and then attach the required field validator to it....

TextBox tb1 = new TextBox();
RequiredFieldValidator re1 = new RequiredFieldValidator();
re1.ControltoValidate = tb1.ID;
divControl.Controls.add(tb1);


The above code needs some tweaking..but should give you the idea. The validator won't screw up the form because the textbox doesn't even exist until you place it as a new control. Smile | :)

That, or I've personally become quite fond of using javascript to validate forms...

var namebox = document.getElementById('<%= Name_textbox.ClientID %>');
if (namebox.value == ''){
          var message = "We seem to be missing some information. Please correct the following items before submitting:\n\n";
          if (namebox.value == '') {
              message += "Name box cannot be blank.\n";
              namebox.style.backgroundColor = 'yellow';
          }


hopefully this helps! good luck

Knowledge is not power, however, the acquisition and appropriate application of knowledge can make you a very powerful individual.

GeneralRe: Custom validator Pin
diacoboss31-Aug-09 0:28
diacoboss31-Aug-09 0:28 
GeneralRe: Custom validator Pin
compninja2531-Aug-09 2:00
compninja2531-Aug-09 2:00 
QuestionFormatting of textbox within listview in webform [modified] (Problem solved) Pin
Patrick Garrity28-Aug-09 3:47
Patrick Garrity28-Aug-09 3:47 
Questionedit property of data gridview control Pin
myinstincts28-Aug-09 2:33
myinstincts28-Aug-09 2:33 
AnswerRe: edit property of data gridview control Pin
janani1328-Aug-09 2:46
janani1328-Aug-09 2:46 
GeneralRe: edit property of data gridview control Pin
myinstincts28-Aug-09 2:52
myinstincts28-Aug-09 2:52 
GeneralRe: edit property of data gridview control Pin
sashidhar30-Aug-09 21:07
sashidhar30-Aug-09 21:07 
QuestionLinking ASP.NET web controls with CSS styles [modified] Pin
Chesnokov Yuriy28-Aug-09 2:21
professionalChesnokov Yuriy28-Aug-09 2:21 
AnswerRe: Linking ASP.NET web controls with CSS styles Pin
janani1328-Aug-09 2:53
janani1328-Aug-09 2:53 
AnswerRe: Linking ASP.NET web controls with CSS styles Pin
Chesnokov Yuriy28-Aug-09 3:12
professionalChesnokov Yuriy28-Aug-09 3:12 
GeneralRe: Linking ASP.NET web controls with CSS styles Pin
DoctorMick28-Aug-09 5:24
DoctorMick28-Aug-09 5:24 
QuestionRe: Linking ASP.NET web controls with CSS styles Pin
Chesnokov Yuriy28-Aug-09 7:50
professionalChesnokov Yuriy28-Aug-09 7:50 
QuestionAdd Hashtable into the arraylist in javascript Pin
zeeShan anSari28-Aug-09 2:09
zeeShan anSari28-Aug-09 2:09 
Questionstore image in databse Pin
rinku soni 2328-Aug-09 1:50
rinku soni 2328-Aug-09 1:50 
AnswerRe: store image in databse Pin
Coding C#28-Aug-09 2:02
Coding C#28-Aug-09 2:02 
AnswerRe: store image in databse Pin
Arun Jacob28-Aug-09 2:22
Arun Jacob28-Aug-09 2:22 
Questionwhen set property enable = false for checkbox control in design time then after how to enable = true in javascript Pin
anish27patel28-Aug-09 1:32
anish27patel28-Aug-09 1:32 

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.