Login    Forum    Search    FAQ   Blog

Board index » Server Side Development » Dotnet




 Page 1 of 1 [ 5 posts ] 



Author Message
 Post subject: fix 1st 4 digits n text box
 Post Posted: Sat Oct 24, 2009 8:21 am 
Offline

Joined: Sat Feb 21, 2009 12:46 pm
Posts: 15
In the asp.net,

i need a textbox should "ve in the total 10 digits nd it was first 4 digits must
be-1234

Code:
1231

1232

1233


rest 6 digits can be nething

how could i allow this??/

pls help soon


Top 
 Post subject: Re: fix 1st 4 digits n text box
 Post Posted: Sat Oct 24, 2009 8:21 am 
Offline

Joined: Sat Feb 21, 2009 11:06 am
Posts: 1794
Hi every one ,

do try usin a reg exp validator, wid a validation exp of "123[1-4]\d{6}".

Hope u find dis useful


Top 
 Post subject: Re: fix 1st 4 digits n text box
 Post Posted: Sat Oct 24, 2009 8:22 am 
Offline

Joined: Sat Feb 21, 2009 1:08 pm
Posts: 549
You could make the text box just like

Code:
<span class="TextBoxClass">1234<asp:TextBox id="txtNum" runat="server"/><asp:CompareTypeValidator ControlToValidate="txtNum" Operator="DataTypeCheck" DataType="Integer" runat="server">*</asp:CompareTypeValidator> </span>


Top 
 Post subject: Re: fix 1st 4 digits n text box
 Post Posted: Sat Oct 24, 2009 8:23 am 
Offline

Joined: Sat Feb 21, 2009 12:46 pm
Posts: 15
thnk u so much but dat is just an example,

Code:
my values are 1234

7811

8524

4511


how could i allow only these 1st four digits nd rest 6 ne digit


Top 
 Post subject: Re: fix 1st 4 digits n text box
 Post Posted: Sat Oct 24, 2009 8:23 am 
Offline

Joined: Sat Feb 21, 2009 11:06 am
Posts: 1794
Hi,

I that case use : "(1234|7811|8524|4511)\d{6}"


Top 
Display posts from previous:  Sort by  
 
 Page 1 of 1 [ 5 posts ] 




Board index » Server Side Development » Dotnet


Who is online

Users browsing this forum: No registered users and 1 guest

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron