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

In which situation can you not use a viewstate?

711


What is a user developed application?

706


What is the difference between the response.write() and response.output.write() methods?

735


How will you maintain versioning in asp.net 2.0?

748


What parameters can you pass in the url of the api?

840


how can we create wcf in asp.net and how can we cll that in to asp.net application?plsss tel me each step clearly

1776


What are server activated objects?

826


What is cookieless session id explain in brief?

717


What is postback request?

718


How does the service stream content?

763


Explain the function of new view engine in asp.net? : asp.net mvc

738


Differentiate between globalization and localization.

739


Explain program to call the js function when the change is being made in the dropdown list made in asp.net mvc? : asp.net mvc

717


What is authorization in asp.net?

787


Why do we use datasource in asp.net?

698