TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
anjali khan
NA
293
66k
how to create label and 2 chkbox in custom control in asp.ne
Sep 19 2015 1:21 AM
how to create 1 label and 2 checkbox in custom control in asp.net?
i created the below code in aspx page ...
but i want to use custom control...how to make it custom control in asp.net ?
please send me step by step...
i seen in net by i didnt understand..
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script type="text/javascript">
function fncheck(me) {
me.checked = true;
var chkary = document.getElementsByTagName('input');
for (i = 0; i < chkary.length; i++) {
if (chkary[i].type == 'checkbox') {
if (chkary[i].id != me.id)
chkary[i].checked = false;
}
}
}
</script></head>
<body>
<form id="form1" runat="server">
<h3 style="font-size:larger; color:Maroon">
User Control</h3>
<div style="width: 100%; text-align: center">
<table style="width: 33%; background-color: Silver; height: 98px;">
<tr>
<td>
<asp:Label ID="Label1" runat="server" Text="Some Text" ForeColor="Blue"></asp:Label>
<asp:CheckBox ID="chkyes" Text="Yes" runat="server" AutoPostBack="true" onclick="fncheck(this)" />
<asp:CheckBox ID="chkno" Text="No" runat="server" AutoPostBack="true" onclick="fncheck(this)" />
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
Reply
Answers (
2
)
Retrieve database values into checked list box in c#
retrive database data of in 1tab to another tab for crud .