Hi to all master of asp.net and c#
how to do the client side validation using c# and with out using required field validation control i wrote the code of javascript in head tab and i write in page_load method
protected void Page_Load(object sender, EventArgs e)
{
btnAdd.Attributes.Add("onclick", "return validate()");
}
but its not checking the fields and javascript is
where i am doing mistake i don't know
Loading
Niradhip ChakrabortyPosted Aug 12, 2009, 2:29 AM
mohdazeemuddin ahmedPosted Aug 12, 2009, 1:17 AM
to do validation which is good JavaScript or custom Validation. i don't want do post back if there is any missing field available.
Kirtan PatelPosted Aug 11, 2009, 1:53 PM
and Even you dont need to use getElementById to Locate Control :)
use it like below code
aspx Code
Master BillaPosted Aug 11, 2009, 11:41 AM
When you are write javscript, you keep in mind its JAVA. so you need take all attribute also here.
So here i have corrected your code. try this
protected void Page_Load(object sender, EventArgs e)
{
btnAdd.Attributes.Add("onclick", "return validate();");
}
but its not checking the fields and javascript is
Thank you
Niradhip ChakrabortyPosted Aug 11, 2009, 10:06 AM