How to Chek Easiest Way to Value of Textbox

Posted by Prabhakar under Regular Expressions on 3/30/2011 | Points: 10 | Views : 1193 | Status : [Member] [MVP] | Replies : 6
Hi firends


i want to check whats the value in my Textbox . numeric or String . . i want to create mobile validation with condition . . and without validatior

Best Regard's
Prabhakar



Responses

Posted by: T.saravanan on: 3/30/2011 [Member] [MVP] Silver | Points: 25

Up
0
Down
Hi Prabhakar,

Just create a JavaScript for your validation then call that function in your textbox leave.



Thanks,
T.Saravanan

Prabhakar, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Prabhakar on: 3/30/2011 [Member] [MVP] Starter | Points: 25

Up
0
Down
HI T.saravanan

i want to create condition for mobile no validation . . and Text_Changed Event not Support in ASP.NET 3.5

Best Regard's
Prabhakar

Prabhakar, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: T.saravanan on: 3/30/2011 [Member] [MVP] Silver | Points: 25

Up
0
Down
Hi Prabhakar,

I know Text_Changed Event not Support in ASP.NET 3.5.why you choose ASP.Net controls, HTML control is enough for achieve your requirement.
Just add one HTML textbox control its onblur event call your script.

Try it this way...

Thanks,
T.Saravanan

Prabhakar, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Prabhakar on: 3/30/2011 [Member] [MVP] Starter | Points: 25

Up
0
Down
Hello guy's


i am find out the solution . . don't worry about this question


if (!(Char.IsNumber(txtmobile.Text, 0)))
{
lblresult.Text="Please Enter Integer . . Character Not Allowed!";
}

Best Regard's
Prabhakar

Prabhakar, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sutotpal on: 3/30/2011 [Member] Starter | Points: 25

Up
0
Down
hi prabhaker,

try this function ,it's very useful..

function IsNumeric(value) {
if (value == null || !value.toString().match(/^[-]?\d*\.?\d*$/)) return false;
return true;
}



Best Regards,
Sutotpal

Prabhakar, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: T.saravanan on: 3/30/2011 [Member] [MVP] Silver | Points: 25

Up
0
Down
@Prabhakar,

Are you use this code in any button event? I think its call in server side validation.

Any how you got an answer....

Thanks,
T.Saravanan

Prabhakar, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response