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

How to remove cache object in asp.net?

2 Answers   TVS,


How do we assign page-specific attributes?

0 Answers  


Which is faster union or union all?

0 Answers  


How to find out what version of asp.net I am using on my machine?

0 Answers  


Explain the difference between globalization and localization techniques

0 Answers  


What are different templates available in Repeater,DataList and Datagrid ?

1 Answers  


What are server objects?

0 Answers  


What is the good practice to implement validations in aspx page?

0 Answers  


Describe a bubbled event and how it is used ?

0 Answers   Siebel,


hi all; i need standard notes on .net(basics) for my seminar. im a starter in .net. plz suggest whr can i get satisfactory notes!!!

1 Answers  


How can you use a custom controls in ASP.NET application?

0 Answers   Sans Pareil IT Services,


Security types in ASP/ASP.NET? Different Authentication modes?

4 Answers   QuadLabs Technologies,


Categories