moiseszaragoza 0 Newbie Poster

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

<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:

<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

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);
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.