RequiredFieldValidator--write code in javascript
Answers were Sorted based on User's Feedback
Answer / srinivasan
function validate()
{
var Name = document.getElementById("txtName");
if( Name.value=="")
{
alert("Please enter the Name");
return false;
}
}
button OnClick() we hav to cal this function
Is This Answer Correct ? | 9 Yes | 1 No |
Answer / 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 |
Answer / gangadhar
function validate()
{
if(document.getElementById("NameId").value == null)
alert("Please enter the name");
document.getElementById("NameId").focus();
return false;
}
in button OnClick() we hav to cal this function
Is This Answer Correct ? | 6 Yes | 3 No |
what is the generics and where used generics in your project?
what is state management?
Differentiate between early binding and late binding.
What’s the catch?
Explain method to handle error using HttpError in Web API?
If I m using Session State Partioning where I have partitioned my session into 4 servers then how can I know that my session will be stored on which server?
What is the purpose of the validation summary control? What do you need to do to prevent an error message from being displayed in a validator when a validation summary control is used? How can you display a message in both the validator and the validation summary control?
Where the cookie value is stored?
How does session id work?
What is the maximum number of classes that can be contained in one dll file?
What is versioning in .NET?
1 Answers Syntax Softtech, Wipro,
What is session state server?