G
Guest
I've written some code (C# / ASP.NET on .NET v2.0) that allows me to
list all stored procedures in a SQL Server database, along with with
their associated CREATE PROCEDURE statements. Here's an excerpt from
that code:
============================================
<asp:Repeater runat="server" ID="StoredProcedureCheckboxList">
<HeaderTemplate>
<table border="0" cellpadding="0" cellspacing="3" width="100%">
<tr style="height:0px;">
<td style="width:30px;" nowrap></td>
<td></td>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td><input type="checkbox" name="SelectedStoredProcedureIds"
value="<%# DataBinder.Eval(Container.DataItem, "StoredProcedureID")
%>"></td>
<td><a href="javascript:void(0);"
onclick="document.getElementById('tr<%#
DataBinder.Eval(Container.DataItem, "StoredProcedureID")
%>').style.display = ((document.getElementById('tr<%#
DataBinder.Eval(Container.DataItem, "StoredProcedureID")
%>').style.display == '')?('none')''));"><%#
DataBinder.Eval(Container.DataItem, "StoredProcedureName") %></a></td>
</tr>
<tr id="tr<%# DataBinder.Eval(Container.DataItem,
"StoredProcedureID") %>" style="display:none;">
<td colspan="2"><pre class="code"><%#
DataBinder.Eval(Container.DataItem, "StoredProcedureTextChunk")
%></pre></td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table><br>
</FooterTemplate>
</asp:Repeater>
============================================
What I need to do is get a reference (via my C# code-behind page) to
the collection of checkboxes generated by this control, so I can
loop/iterate through them. I tried adding [ runat="server" ] to the
<input type="checkbox"> tag, but that gave me an compiler error message
("The server tag is not well-formed"). I'm probably missing something
obvious (I'm an ASP.NET newbie)... any suggestions or comments would be
greatly appreciated!
-= Tek Boy =-
list all stored procedures in a SQL Server database, along with with
their associated CREATE PROCEDURE statements. Here's an excerpt from
that code:
============================================
<asp:Repeater runat="server" ID="StoredProcedureCheckboxList">
<HeaderTemplate>
<table border="0" cellpadding="0" cellspacing="3" width="100%">
<tr style="height:0px;">
<td style="width:30px;" nowrap></td>
<td></td>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td><input type="checkbox" name="SelectedStoredProcedureIds"
value="<%# DataBinder.Eval(Container.DataItem, "StoredProcedureID")
%>"></td>
<td><a href="javascript:void(0);"
onclick="document.getElementById('tr<%#
DataBinder.Eval(Container.DataItem, "StoredProcedureID")
%>').style.display = ((document.getElementById('tr<%#
DataBinder.Eval(Container.DataItem, "StoredProcedureID")
%>').style.display == '')?('none')''));"><%#
DataBinder.Eval(Container.DataItem, "StoredProcedureName") %></a></td>
</tr>
<tr id="tr<%# DataBinder.Eval(Container.DataItem,
"StoredProcedureID") %>" style="display:none;">
<td colspan="2"><pre class="code"><%#
DataBinder.Eval(Container.DataItem, "StoredProcedureTextChunk")
%></pre></td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table><br>
</FooterTemplate>
</asp:Repeater>
============================================
What I need to do is get a reference (via my C# code-behind page) to
the collection of checkboxes generated by this control, so I can
loop/iterate through them. I tried adding [ runat="server" ] to the
<input type="checkbox"> tag, but that gave me an compiler error message
("The server tag is not well-formed"). I'm probably missing something
obvious (I'm an ASP.NET newbie)... any suggestions or comments would be
greatly appreciated!
-= Tek Boy =-