Asp checkboxlist Example using C#
Asp checkboxlist Example using C#:
In this post we consider a example of asp.net checkboxlist
by using C# code. In this tutorial we also consider Introduction of “Asp.net checkboxlist control example”. If you want to basic things about checkboxlist
then visit this post.
We take many other Examples related to the checkboxlist that
describe different-2 way and solutions related to the web development these
are:
- Check Uncheck all asp.net CheckBoxList in asp.net using jQuery
- Example of jQuery Validate on Radiobuttonlist in Asp.Net using C#
- Example jQuery Validate on CheckBoxList using C#
- Check Uncheck all html CheckBoxlist controls using jQuery:
- 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
- Get Asp.net CheckBoxList control values using Jqury.
- Asp.net CheckBoxList using jQuery:
- Checkboxlist control in asp net
Now we take one more checkboxlist Example here :
<%@ Page
Language="C#"
AutoEventWireup="true"
CodeFile="Asp_net_checkboxlist.aspx.cs"
Inherits="Asp_net_checkboxlist"
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD
XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div align="center">
<h2>
Asp
Example of checkboxlist:</h2>
<p>
<asp:CheckBoxList ID="CheckBoxList1"
runat="server"
Height="177px"
style="font-weight: 700; font-family: Arial,
Helvetica, sans-serif; font-size: large">
<asp:ListItem>optionitem1</asp:ListItem>
<asp:ListItem>optionitem2</asp:ListItem>
<asp:ListItem>optionitem3</asp:ListItem>
<asp:ListItem>optionitem4</asp:ListItem>
</asp:CheckBoxList>
</p>
<p>
<asp:Label ID="Label1" runat="server"
style="font-weight: 700; color: #FF0000"></asp:Label>
</p>
<p>
<br />
<asp:Button ID="Button1"
runat="server"
Text="check"
onclick="Button1_Click"
style="font-weight: 700"
Width="93px"
/>
</p>
</div>
</form>
</body>
</html>
using
System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class Asp_net_checkboxlist
: System.Web.UI.Page
{
protected void
Page_Load(object sender, EventArgs e)
{
}
protected void
Btn1_Click(object sender, EventArgs e)
{
foreach (ListItem
li1 in CBL1.Items)
{
if (li1.Selected == true)
{
Lbl1.Text += li1.Text + "<br
/>";
}
}
}
}
Other Asp.net Example:
- Templatefield in gridview control
- Introduction of Asp.net Grid View Control
- AppFabric component in Cloud Computing
- Cloud Service Provider:
- What is the Cloud Service
- Month Calendar Control
- Datetime difference in seconds
- How To bind RadioButtonList Control From data base
- How to Add Reference of .dll file in Asp.net web site/Application
- how to use Captcha in asp.net Second post
- how to use CAPTCHA in asp.net
- How to find Repetitions of character in to given String
- fill data into Dropdown list by using Jquery
- How to Achieve Many Selection in Drop Down List
- Create data Table Dynamically and bind to Drop down List in asp.net
asp programming
ReplyDeleteNumber to Decimal