Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


RequiredFieldValidator--write code in javascript

Answers were Sorted based on User's Feedback



RequiredFieldValidator--write code in javascript..

Answer / 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

RequiredFieldValidator--write code in javascript..

Answer / amit das

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

or

function validate()
{
with(document.formname)
{
txtboxid.value == ""
alert("Please enter value");
txtboxid.focus();
return false;
}
}

or we can use

document.form.txtboxid.value

instead of

document.getElementById("NameId").value

Is This Answer Correct ?    7 Yes 2 No

RequiredFieldValidator--write code in javascript..

Answer / 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

More ASP.NET Interview Questions

Where would you use an IHttpModule, and what are the limitations of anyapproach you might take in implementing one?

1 Answers   Siebel Systems,


what is state management,what is the purpose of it,how it will be implemented in real time?

2 Answers  


Types of optimization and name a few and how do u do?

1 Answers   Accenture,


What is a WebService and what is the underlying protocol used in it? Namespace?

1 Answers  


To which side ( server ? client) does the user input data validation occur? Explain the reasons for it?

1 Answers   Siebel,


What are the two properties that are common in every validation control?

4 Answers   Siebel,


How can you identify that the page is post back?

0 Answers  


What is viewstate?

6 Answers   Abacus, Microsoft, Sopra,


what is Theme in Asp.net 2.0

1 Answers   Syntel,


What is difference between viewstate and session in asp net?

0 Answers  


What are the types of caching in asp.net?

0 Answers  


What is ashx file in asp.net?

0 Answers  


Categories