RequiredFieldValidator--write code in javascript

Answer Posted / gangadhar

function validate()
{
if(document.getElementById("NameId").value == null)
alert("Please enter the name");
document.getElementById("NameId").focus();
return false;
}

in button OnClick() we hav to cal this function

Is This Answer Correct ?    6 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a postback in asp net?

815


Describe how ASP.NET maintains process isolation for each Web application?

827


if i want to give an alert message like "try after sometime" to a web page which is being seen by other person.if a web page is not seen by anyone then it should display otherwise it show a display a message stating that other person is viewing so try after some time........how can i implement this.

2028


What is the difference between login controls and forms authentication?

749


Difference between DataGid and Girdview? Difference b/w .Net 2.0, 3.0 and 3.5 ? Diff b/w dispose & Finialize Methods?

2267


How to create a db connection at one place/page so that we can use that connection for all pages/forms/windows.what r the steps ned to be performed if question not clear,let me know

911


How to change Master page in ASP.Net using code?

778


What is the request flow used for asp.net mvc framework? : asp.net mvc

733


Explain how can we inherit a static member?

729


What is a session in programming?

760


Is asp.net and .net the same?

717


What is asp.net file?

841


Explain automatic memory management in .net.

784


What is asp.net futures?

765


Is web config mandatory?

743