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 are the elements of a website?

513


What are the parts of an http response?

494


What are validators and list some validators of asp.net?

537


What are navigation controls? How many navigation controls are there in ASP.NET 4.0?

537


Explain difference betn dataset and recordset?

528






WSDL means?

663


How does session work in asp net?

552


Define a web service in .net?

613


Why viewstate is used in asp.net?

507


Difference between overriding and overloading?

699


What are the different types of events are occured when a client requests an ASP.NET page from IIS server?

583


How u refer webservices?

1492


Who can consume WebAPI?

587


What are the advantages of using session?

432


What is the maximum number of classes that can be contained in one dll file?

676