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

What is the difference between user control and custom control?

574


What is cookies in asp net?

620


Can we add code files of different languages in app_code folder?

705


Which class is used to send an email message from an ASP.NET Web page?

650


How can you implement encapsulation in asp.net?

11690






Why mvc is better than asp.net? : Asp.Net MVC

558


Explain the difference between debug.write and trace.write?

605


What is difference between viewstate and session in asp net?

640


What is the difference between rest and restful?

617


How to Insert/Add in ASPXgridview

656


How many types of validation are there?

617


Elaborate differentiation between ViewState and SessionState?

712


In your ASP.NET 2.0 web application you want to display an image that is selected from a collection of images. What approach will you use to implementing this?

665


Describe the diffeerence between inline and code behind - which is best in a loosely coupled solution?

736


What is the difference between localization and globalization?

663