.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Interview Question >> JQuery >> Post New Question Subscribe to Interview Questions

How do you check or uncheck a checkbox input or radio button using JQuery?

Posted By :abhays     Posted Date :September 26, 2014    Points :40   Category :JQuery 
There are two ways to check or uncheck a checkbox or radio button.
Set the 'checked' attribute to true or false.
// Check #TagId
$('#TagId').attr('checked', true);
// Uncheck #TagId
$('#TagId').attr('checked', false);
Add or remove the 'checked' attribute:
// Check #TagId
$("#TagId").attr('checked', 'checked');
// Uncheck #TagId
$("#TagId").removeAttr('checked');

You can also find related Interview Question to How do you check or uncheck a checkbox input or radio button using JQuery?  below: 

How can I screen input in a textbox?

  
Yes, For this, it's usually best to start by subclassing the TextBox control so that your solution is reusable within your project (or outside your project). Override OnTextChanged, or for more control, OnKeyPress and OnKeyDown. OnKeyPress fires for printable characters; OnKeyDown fires for all key combinations. Both of these offer a Handled property in the event arguments parameter, which you can set to True to cancel the event. (More...)

How can we check that some changes have been made to dataset since it was loaded?

  


The changes made to the dataset can be tracked using the GetChanges and HasChanges methods.
GetChanges():
-------------
The GetChanges returns dataset which are changed since it was loaded or since Acceptchanges was executed.

HasChanges():
------------
The HasChanges property indicates if any changes were made to the dataset since it was loaded or if acceptchanges method was executed.

RejectChanges():
----------------
The RejectChanges can be used to revert thee changes made to the dataset since it was loaded

(More...)

What is Check Constraint?

  
Check constraint specifies a condition that is enforced for each row of the table on which the constraint is defined. Once constraint is defined, insert or update to the data within the tables is checked against the defined constraint
(More...)

What is the difference between RULE and Check Constraint?

  
The major difference between rule and Check is reusability. Check constraint is associated with columns in a Table. So these can't be re-used. Rules are defined with in a database and can be applied to any number of columns. (More...)

How to clear a datagrid on a button click?

  
You need to Clear the DataSource of the dadaGrid.
So try this: dataSet1.Clear();
dataGrid1.DataSource = dataSet1.TableNameHere.DefaultView;
or
C#: dataGrid1.DataSource = null;
VB: dataGrid1.DataSource = nothing (More...)

Should user input data validation occur server-side or client-side? Why?

  
All user input data validation should occur on the server at a minimum. Additionally, client-side validation can be performed where deemed appropriate and feasable to provide a richer, more responsive experience for the user. (More...)

What is JQuery?

  
JQuery is Java Script library or Java Script Framework which helps in how to traverse HTML documents, do some cool animations, and add Ajax interaction to any web page. It mainly helps programmer to reduce lines of code as huge code written in Java Script, can be done easily with JQuery in few lines. (More...)

What does dollar Sign ($) means in JQuery?

  
Dollar Sign is nothing but it's an alias for JQuery. Take a look at below jQuery code

$(document).ready(function(){

});


Over here $ sign can be replaced with "jQuery " keyword.

jQuery(document).ready(function(){

}); (More...)

How is body onload() function is different from document.ready() function used in jQuery?

  
Document.ready() function is different from body onload() function because off 2 reasons.

1. We can have more than one document.ready() function in a page where we can have only one onload function.
2. Document.ready() function is called as soon as DOM is loaded where body.onload() function is called when everything gets loaded on the page that includes DOM, images and all associated resources of the page. (More...)

What are the steps you need to follow to use jQuery in ASP.Net project?

  
It's really simple. One just need to add reference of javascript file(.js). Go to Jquery.com and download the latest version of jQuery. When download is completed, there is a "jQuery-1.3.2.js" in the folder. Include this file




and you good to go now for JQuery.

Note : 1.3.2 denotes the library version.. It can be vary depending upon the version of Jquery you download. (More...)

Suppose you want a certain ASP.NET function executed on MouseOver for a certain button. Where do you add an event handler?

  
Add an OnMouseOver attribute to the button. Example: btnSubmit.Attributes.Add("onmouseover","someClientCodeHere();"); (More...)

How to define a button USING XAML?

  
To define a button in WPD using XAML use the following syntax,



Example:-


Here the

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

 
Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.


Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend