Home
Forums
New posts
Search forums
Articles
Latest reviews
Search resources
Members
Current visitors
Newsgroups
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Home
Forums
Newsgroups
Microsoft DotNet
Microsoft ASP .NET
ASP.NET v2.0 and Repeater controls
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Guest, post: 9523894"] 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 =- [/QUOTE]
Verification
Post reply
Home
Forums
Newsgroups
Microsoft DotNet
Microsoft ASP .NET
ASP.NET v2.0 and Repeater controls
Top