asp.net newbie

  • Thread starter Thread starter dave
  • Start date Start date
D

dave

hi
I'm asp programmer but now learning and trying to switching asp.net.

i have simple form which takes mobile number as input.
i want to put validation on that field..so it should accept minimu 10 character and all should be integer.

i want to display error msg same as javascript alert..

how its possible asp.net?

any help would be appreciated...

thanx
 
Check out the range validator and regular expression validator server
controls. The second would be much more complex, but will give you a fine
tuned way to restrict the data format entered.

Good luck.

Mark
www.dovetaildatabases.com

hi
I'm asp programmer but now learning and trying to switching asp.net.

i have simple form which takes mobile number as input.
i want to put validation on that field..so it should accept minimu 10
character and all should be integer.

i want to display error msg same as javascript alert..

how its possible asp.net?

any help would be appreciated...

thanx
 
but what about if we want to display error message as alert???
and return focus to that input???
thanx
 
If you want to use a validation control, set its properties
EnableClientScript and ShowMessageBox to true.

Eliyahu
 
Sorry, but as far as I know - the ShowMessageBox propert is only associated
with the ValidationSummary control, which will work in your situation, only
if you use another validation control along with it, and set it's display to
None, add an error message -

The validation summary is for multiple validation controls on a page, to
summarize them all in one on-page or alert-type message

David Wier
MCP, MVP ASP.NET, ASPInsider
http://aspnet101.com
http://aspexpress.com
 
Back
Top