Write a code for "RequiredFieldValidator" in java script

Answer Posted / amit patel

function validate()
{
if(document.getElementById('<%=Name.ClientID%>').value
== "")
alert("Please enter the name");
document.getElementById("Name").focus();
return false;
}

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is asp.net a programming language or framework?

554


What is different in .net 1.1 and .net 2.0?

578


What is autopostback true?

612


When we use cookie less session? Explain its working?

569


What are custom user controls in asp.net?

522






Explain what is postback in asp. Net?

554


Explain the difference between asp.net mvc and asp.net webforms? : asp.net mvc

531


What is the page life cycle in asp.net?

563


How can I open ashx file in mobile?

624


What's the use of formatters in .net?

576


What is mta?

631


Where is session data stored in asp net?

515


Which is better union or union all?

564


Where is asp.net session stored?

479


Explain the differences between clr & cts?

564