Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Validation

Status
Not open for further replies.

choudhmh

Programmer
Aug 9, 2004
34
GB
Hi Guys,
I have this textBox encryption field which is related to the database. The database shows only interger should be inptted on that textbox.
How would i write an asp.net validation script, so only intergers are entered and if alphabetc text or alphanumeric text are entered it shows an error.

I tried doing it like this but the back end code shows error:

<div>
<label class="textlabel" for="txtEncryptionMethod">Encryption Method</label>
<span class="formfield">
<asp:rangevalidator id="valid" runat="server"
controltovalidate="txtEncryptionMethod" minimumvalue="5"
maximumvalue="20" type="integer" />

</span>
</div>

Back end error i get is due to:
txtEncryptionMethod.Text = .EncryptionMethod

can anyone write me a validation script for this part o fthe programme.
Thanks
Mac
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top