N
needin4mation
Hi, I have an asp:button that has a ShowModalDialog script attribute
added to it.
When the ShowModalDialog opens the user is supposed to select some data
which is then sent back to the calling .aspx page and that data sent
back is placed in a hidden textbox for processing when the form posts
back from the asp:button (the same button that called the
ShowModalDialog windows, calls the window and then postsback). This
works fine.
If the showmodaldialog opens and the user closes the window without
selecting any data to send back to the parent form, then the asp:button
has a RequiredFieldValidator on the hidden textbox to keep the button
from doing a postback. However, the button posts back anyway and when
the form returns I see the field validator has fired. Everything is
set to runat=server.
Incidently, I should say the field is visible at the moment, but it
will be hidden in production.
How can I keep the asp:button from posting back when the hidden field
is not populated? Thank you.
added to it.
When the ShowModalDialog opens the user is supposed to select some data
which is then sent back to the calling .aspx page and that data sent
back is placed in a hidden textbox for processing when the form posts
back from the asp:button (the same button that called the
ShowModalDialog windows, calls the window and then postsback). This
works fine.
If the showmodaldialog opens and the user closes the window without
selecting any data to send back to the parent form, then the asp:button
has a RequiredFieldValidator on the hidden textbox to keep the button
from doing a postback. However, the button posts back anyway and when
the form returns I see the field validator has fired. Everything is
set to runat=server.
Incidently, I should say the field is visible at the moment, but it
will be hidden in production.
How can I keep the asp:button from posting back when the hidden field
is not populated? Thank you.