Guest yagnik3128 Posted October 1, 2005 Share Posted October 1, 2005 This is the Code <TABLE id="Table4" style="HEIGHT: 19px" cellSpacing="0" cellPadding="0" width="358" border="0"> <%For Each FetchLawRow In FetchLawDS.Tables(0).Rows%> <TR vAlign="top" align="left"> <TD style="WIDTH: 7px" width="7"> <P><asp:CheckBox id="CheckBox3" AutoPostBack =True runat="server" Width="16px"></asp:CheckBox></P> </TD> <TD class="TextObject" width="255"> <P style="TEXT-ALIGN: left"><B><SPAN style="FONT-WEIGHT: bold; FONT- SIZE: 12pt; COLOR: black"><%=FetchLawRow.Item("Name")%> </SPAN></B></P> </TD></TR><%Next%></TABLE> Here checkboxex will be created at the ruin time as per the total rows in DataSet FetchLawDS. and for all the check boxex the ID will be same "CheckBox3"But i want to know (the value of FetchLawRow.Item("ID")) in the Code at the time of CheckBox3_CheckedChanged... i mean which checkbox is clicked...Please Help me..i have tried a lot...and don't get any solutionAnd i am not allowed to use the DataGrid...... Link to comment Share on other sites More sharing options...
maelstorm Posted October 14, 2005 Share Posted October 14, 2005 first of all, i guess that the checkbox ID must be unique, ru getting any error with that?? u can use script to get the necessary checkbox details. This is the Code<TABLE id="Table4" style="HEIGHT: 19px" cellSpacing="0" cellPadding="0" width="358" border="0"> <%For Each FetchLawRow In FetchLawDS.Tables(0).Rows%> <TR vAlign="top" align="left"> <TD style="WIDTH: 7px" width="7"> <P><asp:CheckBox id="CheckBox3" AutoPostBack =True runat="server" Width="16px"></asp:CheckBox></P> </TD> <TD class="TextObject" width="255"> <P style="TEXT-ALIGN: left"><B><SPAN style="FONT-WEIGHT: bold; FONT- SIZE: 12pt; COLOR: black"><%=FetchLawRow.Item("Name")%> </SPAN></B></P> </TD></TR><%Next%></TABLE> Here checkboxex will be created at the ruin time as per the total rows in DataSet FetchLawDS. and for all the check boxex the ID will be same "CheckBox3"But i want to know (the value of FetchLawRow.Item("ID")) in the Code at the time of CheckBox3_CheckedChanged... i mean which checkbox is clicked...Please Help me..i have tried a lot...and don't get any solutionAnd i am not allowed to use the DataGrid...... <{POST_SNAPBACK}> Link to comment Share on other sites More sharing options...
aspnetguy Posted November 24, 2005 Share Posted November 24, 2005 You are using Classic ASP scripting style...it may take some time but look into do things the ".Net" way.I think you will find that Data binding will solve your problem Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now