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
RequiredFieldValidator--write code in javascript
 Question Submitted By :: Jsureshdotnet
I also faced this Question!!     Rank Answer Posted By  
 
  Re: RequiredFieldValidator--write code in javascript
Answer
# 1
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 ?    1 Yes 0 No
Amit Das
 
  Re: RequiredFieldValidator--write code in javascript
Answer
# 2
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 ?    0 Yes 0 No
Gangadhar
 
 
 

 
 
 
Other ASP.NET Interview Questions
 
  Question Asked @ Answers
 
What is the namespace for encryption? Astadia1
I have one .Net application and i have two databases which is in SQL server2000 and one more database in ORACLE? how can i access the database from different Databases? eXensys3
what is the dllhell? why we use the dllhell?  4
what are the events in ASP.net page life cycle?  1
What are the difference between ASP and ASP.Net? Accenture1
Differnce between Control an View State Proteans1
Whats an assembly?  5
What is the lifespan for items stored in ViewState? ISST2
repeater and gridview diff? Why is repeater fast than gridview? TCS2
What is the namespace used to store the information about the user?s locale?  1
Can you please anyone explain in detailed Webservices concepts in Asp.net?  1
which method marks a config file section for encryption?  1
how to update data set? TCS3
Describe the role of inetinfo.exe, aspnet_isapi.dll and aspnet_wp.exe in the page loading process Visual-Soft1
How to remove themes from certain controls?  2
Write a code for "RequiredFieldValidator" in java script Wipro3
Difference between ADO.Net 1.1 and ADO.Net 2.0 ? Value-Labs1
I am trying to redirect another site on button click.  7
What does setting a control's EnableViewState property to false accomplish?  1
Can you explain what inheritance is and give an example of when you might use it?  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