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
Explain how dot net compiled code will become platform independent?
Explain why it is useful to use mvc instead of webforms? : asp.net mvc
How can we create custom controls in asp net?
What is a session in asp.net?
How would ASP and ASP.NET applications run at the same time on the same server?
What are the best practices to follow to secure connection strings in an ASP.NET web application?
What is distributed system in asp.net?
Can master pages be nested?
Why would anyone need to implement their own hashtable or linked list?
What are the new navigation controls in asp.net 2.0?
Can you change a master page dynamically at runtime? How?
What is Pre-Render event in ASP.NET?
What is a session government?
Explain the concept of event bubbling in ASP.NET?
What are session state modes?