Get Asp.net CheckBoxList control values using Jquery:
Getting Asp.net CheckBoxList values using jquery:
CheckBoxList is a Standard asp.net ToolBox control. Here we
take a simple example of CheckBoxList control in asp.net web page using jquery.
As we know that the jquery is more advance of ajax and javaScript. In present time
in web development either on asp.net or any other platform the jqury play the important
roll. Many times we have a Question that is How to get values of selected items
in Asp.net CheckBoxList using JQuery. Today we take a example code
here.
Eventes of checkboxlist:
CallingDataMethods, CreatingModelDataSource, DataBinding, DataBound,
Disposed, Init, Load, PreRender, SelectedIndexChanged, TextChanged,Unload.
Checkboxlist related other post on asp.net tutorial.
- Validation checkbox control using JavaScript
Asp.net checkboxlist control example
- Asp-checkboxlist control demo:
- Asp checkboxlist Example using C#
- Checkboxlist in asp.net(control example)
- Example jQuery Validate on CheckBoxList using C#
- Check Uncheck all html CheckBoxlist controls using jQuery:
- Check Uncheck all asp.net CheckBox in asp.net using jQuery
- Ckeck box list example using javascript.
- Asp.net checkboxlist control example
- How to use CheckBox control in asp.net
- How to check If checkbox Is checked in asp.net
- Validation checkbox control using JavaScript:
- Checkbox list Example using javascript
- Asp.net Checkbox List
Checkboxlist Methods:
AddAttributesToRender, AddedControl, AddParsedSubObject, ApplyStyle,
ApplyStyleSheetSkin, BeginRenderTracing, BuildProfileTree, ClearCachedClientID, ClearChildControlState,
ClearChildState, ClearChildViewState, ClearEffectiveClientIDMode, ClearSelection,
ConfirmInitState, CopyBaseAttributes,CreateChildControls, CreateControlCollection, CreateControlStyle,
CreateDataSourceSelectArguments,
DataBind(), DataBind(Boolean), DataBindChildren, Dispose, EndRenderTracing,
EnsureChildControls,EnsureDataBound, EnsureID, Equals(Object), Finalize, FindControl(String),
FindControl(String, Int32),Focus, GetData, GetDataSource, GetDesignModeState, GetHashCode,
GetItemStyle,GetRouteUrl(Object), GetRouteUrl(RouteValueDictionary), GetRouteUrl(String,
Object),GetRouteUrl(String, RouteValueDictionary), GetType, GetUniqueIDRelativeToHasControls,
HasEvents, IsLiteralContent, LoadControlState, LoadPostData, LoadViewState, MapPathSecure,
MarkAsDataBound, MemberwiseClone, MergeStyle, OnBubbleEvent, OnCreatingModelDataSource,
OnDataBinding, OnDataBound, OnDataPropertyChanged, OnDataSourceViewChanged, OnInit,
OnLoad, OnPagePreLoad, OnPreRender, OnSelectedIndexChanged, OnTextChanged, OnUnload,
OpenFile, PerformDataBinding, PerformSelect, RaiseBubbleEvent, RaisePostDataChangedEvent,
RemovedControl, Render
RenderBeginTag, RenderChildren, RenderContents, RenderControl(HtmlTextWriter),
RenderControl(HtmlTextWriter, ControlAdapter), RenderEndTag,RenderItem,
ResolveAdapter, ResolveClientUrl, ResolveUrl, SaveControlState, SaveViewState, SetDesignModeState,
SetPostDataSelection, SetRenderMethodDelegate, SetTraceData(Object, Object), SetTraceData(Object,
Object, Object), ToString, TrackViewState, ValidateDataSource, VerifyMultiSelect.
Asp.net Checkboxlist selected items in jquery:
<%@ Page
Title="Home
Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
CodeFile="Default.aspx.cs"
Inherits="_Default"
%>
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
<script src="Scripts/jquery-1.4.1.min.js"
type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
$('#<%=cmdGet.ClientID %>').click(function () {
var values = '';
$('#<%=CheckBoxList1.ClientID %>
input[type=checkbox]:checked').each(function
() {
if (values.length == 0) {
values = $('label[for=' + this.id
+ ']').html();
}
else {
values += "," + $('label[for='
+ this.id + ']').html();
}
});
alert(values);
return false;
});
});
</script>
<div>
<h1>
<strong>Getting values of selected items in Asp.net
CheckBoxList</strong></h1>
<br />
<hr />
<asp:CheckBoxList ID="CheckBoxList1"
runat="server"
RepeatDirection="Horizontal">
<asp:ListItem Text="One" Value="1"></asp:ListItem>
<asp:ListItem Text="Two" Value="2"></asp:ListItem>
<asp:ListItem Text="Three" Value="3"></asp:ListItem>
<asp:ListItem Text="Four" Value="4"></asp:ListItem>
<asp:ListItem Text="Five" Value="5"></asp:ListItem>
</asp:CheckBoxList>
<hr />
<br />
<asp:Button runat="server"
ID="cmdGet"
Text="Get Selected
Values" />
</div>
For use of this code you need a file of jquey. So if you
want then download it for here.
Other Asp.net Related Posts:
- Show gridview Row Details And Give Example.
- Example of Templatefield in asp.net gridview.
- Example of DropDownList inside GridView control
- Introduction of Asp.net grid view Control.
- Example of C# for Bind Data to asp.net Textbox inside gridview control
- Bind Data to asp.net textbox control in inside of gridview Using C# Example
- Validation checkbox control using JavaScript
- Check box in ASP.NET GridView
- Ckeck box list example-using-javascript.
- Asp.net checkbox list Example
- Asp.net Label control
- Textbox Asp.net control
- ImageButton control
- Asp.net Imagebutton control example
- Asp.net Button control.
- Literal control in Asp.net.
Comments
Post a Comment