In Investor.aspx page, the DataList1 is binded. The DataList1 has UserControl that get parameter "DistId" which is used for futher when I click on hlOpenDoc. Because I can't set "onclick" attribute to HyperLink, that would be procceeded on server, I created hidden button "btnSetEvent " that is clicked from javascript. At this moment "btnSetEvent" is vissible only for the purpose of understanding my porblm. The problem: When I click on hlOpenDoc(that is in UserControl) I noticed that hfDistID has the same DistId regardless on which row I click the button hlOpenDoc. But when I click on "btnSetEvent" the hfDistID control has correct value that depends on which row I clicked. Why it is happens? Thank you.
Investor.aspx <asp:DataList ID="DataList1" runat="server" CellSpacing="4" Width="545px" DataSourceID="SqlHanpakot"> <ItemStyle BackColor="LightGray" BorderColor="Transparent" Height="20px" /> <SeparatorStyle BackColor="Transparent" BorderColor="Transparent" /> <ItemTemplate> <table style="width: 100%"> <tr> <td style="width: 55px; height: 38px; background-position: center center; text-align: center;"> <uc:OpenDoc DistID='<%# Eval("DistId") %>' NavigateUrl='<%# Eval("sDocPath")+"#pagemode=thumbs" %>' ID="OpenDoc1" runat="server"/> </td> </tr> </table> </ItemTemplate> </asp:DataList>< |