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 the difference between GridView and Repeater controls in ASP.NET?
What do you mean by authorization?
To display data in the combo box, prior to setting the Data Source, what kind of property on a Combo Box do you set with a column name?
What is GAC in ASP.NET 2.0
Can I recieve both html markup for page and code in the asp.net web page's source code portion in the web browser?
What are session objects?
What are sessions and cookies?
What is the part of url?
What is redirecting behavior?
Which is better viewstate or session?
Describe the method to create a permanent cookie?
What are tuples?
How to disable validator control by client side JavaScript?
where can i gather the materials for MCP certification
Explain a program using code nuggets to create a simple application? : asp.net mvc