How avoid the page refresh while checking the confirm pswd??
Am trying to check the confirm password but while checking the confirm password the page is refreshing after it showing empty text box even though the confirm password is matching with password also.I'm using master page so because of contentplaceholder the page is refreshing.So can any one help me how to avoid this page refresh???and I want to check the confirm password textbox with password textbox before clicking on submit button with out page refresh
priya AvanigaddaPosted Jan 29, 2015, 4:21 AM
Ramchand RepallePosted Jan 29, 2015, 4:18 AM
http://jsfiddle.net/rpP4K/
priya AvanigaddaPosted Jan 29, 2015, 4:15 AM
U sent like this
txtPassword.Attributes.Add("value", Password);
but for confirm password only I ahve to check so I have to mention like this
txtrtypepswd.attributes.add("onkeyup", "checkPass();") right???I tried for this also ,validation is working properly but the problem is with page refresh
Khargesh RajputPosted Jan 29, 2015, 4:06 AM
in javascript or html we use value="something in textbox";
In html textbox is like
here textbox.attribute is like input aatributes
priya AvanigaddaPosted Jan 29, 2015, 3:44 AM
Thnx fr ur reply,can u tell me...what is the meaning of value in the above code
Khargesh RajputPosted Jan 29, 2015, 3:39 AM
txtPassword.Attributes.Add("value", Password);
use this code on page load
priya AvanigaddaPosted Jan 29, 2015, 3:31 AM
Thnx for ur reply...I forgot to say ..I tried with Jquery,javascript and asp.net validations also but I'm getting same problem
Khargesh RajputPosted Jan 29, 2015, 3:14 AM
Ramchand RepallePosted Jan 29, 2015, 3:10 AM
" I want to check the confirm password textbox with password textbox before clicking on submit button with out page refresh "
For that you can achieve at client side only by choosing any one of the option
1. JQuery/ Javascript validation write onchange event for pwd and confirm pwd text boxes and check if those text box values are not empty then check for those values are equal or not.
http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_onchange2 (It helps you to implement onchange event)
2. Compare Validator (Validation Controls) in asp.net
http://blogs.msdn.com/b/codefx/archive/2009/09/09/how-to-use-the-asp-net-validation-control-to-validate-the-user-input.aspx
Thanks,
Ramchand