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

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is ViewState? What does the "EnableViewState" property do? Why would I want it on or off?

1171


What are the asp.net security controls?

1204


What are the modes of updation in an updatepanel?

1013


What is state management technique?

1086


What is http post action?

1053


Write code to send e-mail from an asp.net application?

1075


What is session authentication?

1035


What is the use of global.asax file?

1134


What is State Management in .Net and how many ways are there to maintain a state in .Net? What is view state?

1105


What is an assembly? Explain its parts.

1135


How do you open a page in a new window?

1020


How can you handle unmanaged code exceptions in asp.net?

1141


Explain the boxing and unboxing concept in .net?

906


What is the page life cycle in asp.net?

1011


What is asp.net with mvc? : Asp.Net MVC

1027