hi
my page contains a button with a javascript click event.
when i click the button i want to check if the page is valid, and if the answer is yes, to perform the event function. if the page is not valid i want the error message to show in the page's validation summary.
i tired a few code lines:
function btnLogin_Click()
{
if (AllValidatorsValid(Page_Validators))
{
var a = document.getElementById('ctl00_ContentPlaceHolder1_txt1').value;
var b = document.getElementById('ctl00_ContentPlaceHolder1_txt2').value;
alert(a + " " + b);
}
}
i also tried:
if (Page_isValid)
{
....
}
nothing seems to work.