Click here to Skip to main content
15,892,697 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
I want to implement like this,

i use linq to sql, i use this linq query,

C#
var r = from a in db.EMR_EVENTs
                        where a.EventID == (int)Session["eventid"]


                        select new
                        {
                            No_Of_Invitee=a.No_Of_Invitees
                        };


i get different value from this query everytime,now if i get 3 value from this query then i want 9 textboxes,and 6 checkboxes,

means i want user control from database how is it possible.?

is it possible with

XML
<asp:Repeater ID="Repeater1" runat="server">

                         <ItemTemplate>
                       <asp:RadioButton ID="radiomale" runat="server" Text="Male" class="form-control" />
                        <asp:RadioButton ID="radiofemale" runat="server" Text="Female" class="form-control"/>
                        <asp:TextBox ID="txtfirstname" runat="server" class="form-control" ></asp:TextBox>
                        <asp:TextBox ID="txtlastname" runat="server" class="form-control" ></asp:TextBox>
                        <asp:TextBox ID="txtmail" runat="server" class="form-control" ></asp:TextBox>
                         </ItemTemplate>
                        </asp:Repeater>


can i do it with Repeater control then how i use it.?
Posted
Comments
♥…ЯҠ…♥ 16-Dec-13 6:23am    
If 3 then 9 txtbx and 6 chckbx Okay.If its 2 or 5 or 6 or 9? what is the logic behind it. Try to be more specific
ketan italiya 16-Dec-13 6:27am    
simply if x=no of invitee then i want 3x textbox and 2x checkboxes.
ketan italiya 16-Dec-13 6:28am    
above code of repeater is just for demo.
♥…ЯҠ…♥ 16-Dec-13 6:57am    
so you will get x from DB, that is not a matter for you.....
ketan italiya 16-Dec-13 7:01am    
no yar it's a just example here x is the value of invitee.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900