Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing Values using <%%> tag in HTML Code

Status
Not open for further replies.

yagnik3128

Programmer
Jun 14, 2001
64
0
0
IN
hey guys,

I am using this Code in HTML Page to display all the Name from the Dataset

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">
	[COLOR=red]<P><asp:CheckBox id="CheckBox3" 
             AutoPostBack =True runat="server" 
                      Width="16px"></asp:CheckBox></P>[/color]
	</TD>
	<TD class="TextObject" width="255">
	<P style="TEXT-ALIGN: left"><B><SPAN>
               <%=FetchLawRow.Item("Name")%></SPAN></B></P>
	</TD>
   </TR>
<%Next%>
</TABLE>

Now u can see the checkboxes are created at the run-time as per the rows in the dataset and each is having the same id "CheckBox3"

Now in the Code Window... at time of CheckBox3_CheckedChanged event i want to know which row is checked....

Please help me..

i feel like i am in hell.... be'se don't find any solution

Thanks.
 
first, please use the DataBind() method for binding data, otherwise it will be lost to the page events.

second, why are u using a table? why not a Repeater or DataGrid??

third, thats not the best way to code in .NET, its better to include all code in a code behind file...

Known is handfull, Unknown is worldfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top