Sunday, March 11, 2012

Problem using AJAX Update panel

Hi,

put your required field validator outside the update panel.


Required field validators (and several other controls) do not work with updatepanels. Please see this article for any easy fix to get validators working with updatepanels:

http://blogs.msdn.com/mattgi/archive/2007/01/23/asp-net-ajax-validators.aspx


Thanks Dear,

Ur tips is worked successfully .Can you tell me the right way how to find out textbox text length using custom validator and

if the textbox length is more than 160 than it's show error message.

Best Regards

Azad


Hi,

There are two ways. one is you can stop the user from typing more than 160 characters.

By setting the maxlength property of the text to 160.

Another way allow the user to type it. but through the error mess.

function calcLength()

{

var text = document.getElementById("TextBox1").value;

alert(text);

if(text.length > 160)

{

//dispaly error mess

}

else

{

// donothing . Hide the error mess.

}

}

No comments:

Post a Comment