i have a page with a couple of controlls, when i roll over some text i fake that i am pressing the btn. to cause a post back,
ihave a update panel that i want to catch that psot back and not refresh the hole page.
// UPDATE PANL
Code:<asp:UpdatePanel UpdateMode="Always" ID="UpdatePanel1" runat="server"> <ContentTemplate> <avtr:ctrlAvatar ID="pageAvatar" runat="server" /> </ContentTemplate> <Triggers> <asp:AsyncPostBackTrigger ControlID="<%= btnRedirect.ClientID %>" EventName="Click" /> // ERROR HERE </Triggers> </asp:UpdatePanel>
That btnRedirect.ClientID lives on a control.
What i have on the controll is:
Code:<a href="#" onmouseover="RedirectPage('<%= btnRedirect.ClientID %>')">roll over me </a> <asp:Button ID="btnRedirect" runat="server" Text="Button" onclick="btnRedirect_Click" Visible="true" style="display:none" />
C# code
Code:protected void btnRedirect_Click(object sender, EventArgs e) { OnRedirectClicked(sender, "TEXT"); } public delegate void RedirectClick(object sender, string Speech); public event RedirectClick RedirectClicked; protected void OnRedirectClicked(object sender, string Speech) { if (RedirectClicked != null) RedirectClicked(sender, Speech); }


Reply With Quote
Bookmarks