Click here to Skip to main content
15,900,907 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Quote:
HI all,

I am experimenting with the asp Repeateer Control. I have populated its item template like below.

XML
<asp:Repeater ID="Repeater1" DataSourceID="dsrcWebChat" runat="server">
                                   <ItemTemplate>
                                       <span style="cursor:hand;text-decoration:underline;" onclick="OpenChatBox('<%#Container.DataItem("UserID")%>','<%#Container.DataItem("UserID")%>_<%#HttpContext.Current.User.Identity.Name%>_<%#DateTime.Now.Ticks.ToString()%>')"><%#Container.DataItem("Name")%></span><br />
                                   </ItemTemplate>
                               </asp:Repeater>


Further I have a hidden field in the form outside of the Repeater control and i also want to add that hidden field's value inside the OpenChatBox function as parameter.

Any one can give me idea of doing this??
Either on the .cs side or design side??

:)
Posted
Updated 17-Dec-13 20:51pm
v2

1 solution

XML
<%=HiddenField1.Value%>
     <asp:HiddenField ID="HiddenField1" Value ="test" runat="server" /

>


Pass the parameter using <% %> as above.
I hope the above example gives you a clue.
 
Share this answer
 
Comments
VICK 18-Dec-13 2:50am    
Works like a charm... :)
Thanks A lottttttttttttttttt. :)

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