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
What is viewstate in asp net with example?
What is the significance of proxy user?
Explain the reason why the javascript validation not run on the asp.net button but run successfully on the html button?
what cut off mark for po's,what questions they asked for interview?
Explain the namespace classes used in asp.net mvc? : asp.net mvc
What is the difference between Classic ASP and ASP.Net?
calling result set one procedure to anothar procedure in sql2000
What is another word for redirect?
Explain the role of global.asax?
Difference between response.redirect and server.transfer?
What is the difference between web config and machine config files?
What is a swagger in web api?
Which two new properties are added in asp.net 4.0 page class?
Differentiate between globalization and localization.
To bind columns manually which tags do you need to add within the asp:datagrid ?