RequiredFieldValidator--write code in javascript

Answer Posted / srinivasan

function validate()
{
var Name = document.getElementById("txtName");
if( Name.value=="")
{
alert("Please enter the Name");
return false;
}
}

button OnClick() we hav to cal this function

Is This Answer Correct ?    9 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Define static constructor?

730


Explain the various authentication mechanisms in asp.net.

693


In What Order Do The Events Of An Aspx Page Execute. As A Developer Is It Important To Undertsand These Events?

783


What is asp.net? How is it different from asp?

736


What is the use of service provider?

741


What is difference between URL and URI?

810


List the major built-in objects in asp.net?

721


What is microsoft windows sharepoint services?

746


What is the equivalent of date() and time() in asp.net?

715


Explain transparent caching with aop?

687


Explain server control extensibility with reference to asp.net 2.0 ?

715


List the types of authentication supported by asp.net?

717


What is the purpose of url encoding?

678


Explain code snippet to register exception filters from controller?

801


How many types of server controls do we have?Also explain differance between them taking an example of ASP.NET?

2562