H
Harry
Dear All,
First of all, i have a database and i have to select the data in a table.
In the web form, i have a checkbox in each rows. So that the use can select
the row.
initally, i am thinking to use the dataset and databind the datagrid to show
the form.
but i've figured out that, the table style is too complex to use datagrid to
show, thus. i open the HTML code to add
the checkboxs
<%
Dim i As Integer
For i = 0 to 10
%>
<asp:CheckBox id="CheckBox<%=i%>" runat="server"></asp:CheckBox>
<%
Next
%>
i think that i can give a distinct id to each checkbox. e.g.
CheckBox1
CheckBox2
CheckBox3.........
So that i can find out which checkbox has been selected.
But, I have that it is not allowed to use *id="CheckBox<%=i%>"*.
What can i do?
THanks all
Regards,
Casgo
First of all, i have a database and i have to select the data in a table.
In the web form, i have a checkbox in each rows. So that the use can select
the row.
initally, i am thinking to use the dataset and databind the datagrid to show
the form.
but i've figured out that, the table style is too complex to use datagrid to
show, thus. i open the HTML code to add
the checkboxs
<%
Dim i As Integer
For i = 0 to 10
%>
<asp:CheckBox id="CheckBox<%=i%>" runat="server"></asp:CheckBox>
<%
Next
%>
i think that i can give a distinct id to each checkbox. e.g.
CheckBox1
CheckBox2
CheckBox3.........
So that i can find out which checkbox has been selected.
But, I have that it is not allowed to use *id="CheckBox<%=i%>"*.
What can i do?
THanks all
Regards,
Casgo
as this is how you would do it in asp. asp.net is totally different. You should NEVER put code like that intermixed with the html. Do it from codebehind, or a script block