Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
5
Reply
How to check box value dynamically using findcontrol c# asp.
Venkat Govind
Aug 18 2017 12:48 AM
209
Reply
Hi All,good Morning,
below is my html code
.
<table>
<tr>
<td><asp:CheckBox ID="CheckBox1" runat="server" /></td>
<td><asp:CheckBox ID="CheckBox2" runat="server" /></td>
<td><asp:CheckBox ID="CheckBox3" runat="server" /></td>
<td><asp:CheckBox ID="CheckBox4" runat="server" /></td>
<td><asp:CheckBox ID="CheckBox5" runat="server" /></td>
</tr>
</table>
Below code i am trting to get checkbox checked status dynamically but i am getting object refernce not in set Pls provide related code
for (int i = 0; i <= 4; i++)
{
CheckBox chk = (CheckBox)this.FindControl("CheckBox"+i);
if (chk.Checked)
{
}
else
{
}
}
Thanks
VeKaT G
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
5
)
Next Recommended Forum
How to apply validation allow a 1300 or 1800 hundred number
Kundali Matchin API for ASP.NET