P
panche
I'm developing a fairly simple user control that has two textboxes for
date/time entry (a from date/time and a to date/time). One of my
requirements is that there should be no button that sets these values (i.e.,
no button to cause a postback). The problem I'm having is that I need a
number of validations to be performed on the data entry, but I don't know
how to do this without having the user control/page posted back to the
server. Basically, I need some way to dynamically validate the user input
without a postback to the server.
The validations that I need are:
** Is the text entered a valid date/time string?
** Is there some value (i.e., cannot be null/empty)?
** The to date/time cannot be before the from date/time
** The time span cannot be greater than 1 year.
Can some one please help me identify ways to do this type of validations of
user input without a postback to the server?
Also, once the data is entered and in the correct format, how do I get those
values off the .ascx and into the page itself, also without a postback?
Therefore, as the user enters data, the data needs to be dynamically
validated and given to the page (and/or put into session state) so that I
can use it later after the user goes on to the next page.
Hope all this makes sense. Any help is greatly appreciated.
date/time entry (a from date/time and a to date/time). One of my
requirements is that there should be no button that sets these values (i.e.,
no button to cause a postback). The problem I'm having is that I need a
number of validations to be performed on the data entry, but I don't know
how to do this without having the user control/page posted back to the
server. Basically, I need some way to dynamically validate the user input
without a postback to the server.
The validations that I need are:
** Is the text entered a valid date/time string?
** Is there some value (i.e., cannot be null/empty)?
** The to date/time cannot be before the from date/time
** The time span cannot be greater than 1 year.
Can some one please help me identify ways to do this type of validations of
user input without a postback to the server?
Also, once the data is entered and in the correct format, how do I get those
values off the .ascx and into the page itself, also without a postback?
Therefore, as the user enters data, the data needs to be dynamically
validated and given to the page (and/or put into session state) so that I
can use it later after the user goes on to the next page.
Hope all this makes sense. Any help is greatly appreciated.