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 sql data source control in asp.net?
Why web api is better than wcf?
When you are running a component within ASP.NET, what process is it running within on Windows XP? Windows 2000? Windows 2003?
Explain how can you debug your .net application?
How does windows service lifecycle differ from a .standard. Exe?
Can you nest updatepanel within each other?
What does occur first in ASP.Net, Authentication or Authorization?
Which of the following .NET framework supports Web API?
What is application and session in asp.net?
How you can stop the validation of ASP.NET controls from client side?
What is the function of new view engine in asp.net? : asp.net mvc
What is strong-typing versus weak-typing?
What’s the catch?
Where web.config file is used?
Is asp.net and .net same?