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

Explain what a diffgram is, and a good use for one?

1 Answers   FT,


What are Session states available and its Uses?

0 Answers   CTS, iLogic,


What is odata in web api?

0 Answers  


What is Difference between Callbacks and Postback in ASP.NET?

11 Answers  


How does VB.NET/C# achieve polymorphism?

6 Answers   Siebel Systems,


how can u create the forms authentication?and what is the difference between forms authentication and windows authentication?

2 Answers   IBM,


To load your generated dataset with data which method do you invoke?

0 Answers   Siebel,


What are HTTP handlers in ASP.NET?

0 Answers   MindCracker,


What is the difference between sealed vs static class?

0 Answers  


Explain what are delegates?

0 Answers  


What is the difference between User Controls and Master Pages

22 Answers   Deloitte, IBM, IntraLogic, Markit, TCS,


Give me one example of Web API Routing?

0 Answers  


Categories