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
Vikas Singh
1.3k
410
14.8k
How can I check that checkbox is checked or not inside grid view
Sep 13 2020 6:47 AM
How can I check that checkbox is checked or not inside grid view without using loop--
Actually i want to work like onrowcommand
this is checkbox inside gridview-------
<asp:CheckBox runat="server" ID="chkselect" OnCheckedChanged="chkselect_CheckedChanged"
CommandName="chkboxselect" AutoPostBack="true" CommandArgument='<%# Eval("hnysku") %>' />
this is C# code which is working like onrowcommand but here is another problem how can i check checkbox is checked or not ---
List<string> list = new List<string>();
var chk = (CheckBox)sender;
var CommandName = chk.Attributes["CommandName"];
if (CommandName == "chkboxselect")
{
var CommandArgument = chk.Attributes["CommandArgument"];
if (Convert.ToBoolean(chk.Attributes["Checked"]) == true)
{
list.Add(CommandArgument);
}
else
{
list.Remove(CommandArgument);
}
}
Reply
Answers (
1
)
502 - web server receive an invalid response
Validation Required