J
JJ
We have an ASP.NET web form with 1 TextBox, 2 LinkButtons, and 1
RequireFieldValidator. The situation is: the user needs to enter a folder
name in the TextBox and click the first LinkButton (the Create Folder
LinkButton) to create the folder. Then once that's done, they need to click
the second LinkButton (the Next LinkButton) to go to the next page (a
rudimentary wizard).
The RequiredFieldValidator is there to make sure the user enters a folder
name in the TextBox before clicking the first LinkButton (the Create Folder
LinkButton). This all works fine.
What's strange is if the user doesn't enter anything in the TextBox and
clicks the second LinkButton (the Next LinkButton) before clicking the first
LinkButton (the Create Folder LinkButton), the RequiredFieldValidator alarms
the error anyway.
Is this correct behavior? What we want is for the first LinkButton (the
Create Report LinkButton) only to validate that text has been entered in the
TextBox, not the second LinkButton (the Next LinkButton). How can we do
this?
RequireFieldValidator. The situation is: the user needs to enter a folder
name in the TextBox and click the first LinkButton (the Create Folder
LinkButton) to create the folder. Then once that's done, they need to click
the second LinkButton (the Next LinkButton) to go to the next page (a
rudimentary wizard).
The RequiredFieldValidator is there to make sure the user enters a folder
name in the TextBox before clicking the first LinkButton (the Create Folder
LinkButton). This all works fine.
What's strange is if the user doesn't enter anything in the TextBox and
clicks the second LinkButton (the Next LinkButton) before clicking the first
LinkButton (the Create Folder LinkButton), the RequiredFieldValidator alarms
the error anyway.
Is this correct behavior? What we want is for the first LinkButton (the
Create Report LinkButton) only to validate that text has been entered in the
TextBox, not the second LinkButton (the Next LinkButton). How can we do
this?