ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
Google
 
Categories  >>  Software  >>  Microsoft Related  >>  ASP.NET
 
 


 

 
 Visual Basic interview questions  Visual Basic Interview Questions
 C Sharp interview questions  C Sharp Interview Questions
 ASP.NET interview questions  ASP.NET Interview Questions
 VB.NET interview questions  VB.NET Interview Questions
 COM+ interview questions  COM+ Interview Questions
 ADO.NET interview questions  ADO.NET Interview Questions
 IIS interview questions  IIS Interview Questions
 MTS interview questions  MTS Interview Questions
 Crystal Reports interview questions  Crystal Reports Interview Questions
 BizTalk interview questions  BizTalk Interview Questions
 Dot Net interview questions  Dot Net Interview Questions
 Exchange Server interview questions  Exchange Server Interview Questions
 SharePoint interview questions  SharePoint Interview Questions
 Microsoft Related AllOther interview questions  Microsoft Related AllOther Interview Questions
Question
Write a code for "RequiredFieldValidator" in java script
 Question Submitted By :: Jsureshdotnet
I also faced this Question!!     Rank Answer Posted By  
 
  Re: Write a code for "RequiredFieldValidator" in java script
Answer
# 1
suppose the id of the field required to be validated is 
NameId

Thus:- 

function validate()
{
  if(document.getElementById("NameId").value == null)
  alert("Please enter the name");
}
 
Is This Answer Correct ?    4 Yes 1 No
Manoj
 
  Re: Write a code for "RequiredFieldValidator" in java script
Answer
# 2
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 


regards
rajikiran
 
Is This Answer Correct ?    2 Yes 1 No
Rajikiran
 
 
 
  Re: Write a code for "RequiredFieldValidator" in java script
Answer
# 3
function validate()
{
  if(document.getElementById("NameId").value =="")
  alert("Please enter the name");
  document.getElementById("NameId").focus();
  return false;
}
 
Is This Answer Correct ?    2 Yes 2 No
Jayamala
 

 
 
 
Other ASP.NET Interview Questions
 
  Question Asked @ Answers
 
Can you explain what inheritance is and an example of when you might use it?  3
To which side ( server ? client) does the user input data validation occur? Explain the reasons for it?  1
Have you used microsoft dataaccess blocks and Exception blocks? Microsoft1
Describe the role of inetinfo.exe, aspnet_isapi.dll andaspnet_wp.exe in the page loading process? Perot-Systems1
In cache where dats is stored and how(file or object?)  2
Describe the role of inetinfo.exe, aspnet_isapi.dll and aspnet_wp.exe in the page loading process Visual-Soft1
Which @page directive should you create an asynchronous page?  1
Name two properties common in every validation control?  6
What is the other method, other than GET and POST, in ASP.NET?  3
What is the difference between Server.Transfer and Response.Redirect?  4
What base class do all Web Forms inherit from?  2
explain about Back ground process control in .net Infronics1
When does the application ONEND event handler fire? C-Squared-Systems1
What is an iHTTPModule, and explain its implementation with its limitations?  1
can sn.exe can be used before gacutil.exe Accenture2
What is the Difference between Web.config and global.asax? Can we write connection String code in global.asax? Microsystems4
Describe a diffgram ? Write any one use of that?  2
What data type does the Range Validator control support?  3
If Asp Dot Application is stateless what happened? during designing TCS3
what is the difference between assemblyinfo and webconfig files?  1
 
For more ASP.NET Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com