<Triggers>

Please support our C# advertiser: Intel Parallel Studio Home
Reply

Join Date: Sep 2007
Posts: 15
Reputation: moiseszaragoza is an unknown quantity at this point 
Solved Threads: 0
moiseszaragoza moiseszaragoza is offline Offline
Newbie Poster

<Triggers>

 
0
  #1
Feb 18th, 2009
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
  1. <asp:UpdatePanel UpdateMode="Always" ID="UpdatePanel1" runat="server">
  2. <ContentTemplate>
  3. <avtr:ctrlAvatar ID="pageAvatar" runat="server" />
  4. </ContentTemplate>
  5. <Triggers>
  6. <asp:AsyncPostBackTrigger ControlID="<%= btnRedirect.ClientID %>" EventName="Click" /> // ERROR HERE
  7. </Triggers>
  8. </asp:UpdatePanel>


That btnRedirect.ClientID lives on a control.

What i have on the controll is:


  1. <a href="#" onmouseover="RedirectPage('<%= btnRedirect.ClientID %>')">roll over me </a>
  2. <asp:Button ID="btnRedirect" runat="server" Text="Button" onclick="btnRedirect_Click" Visible="true" style="display:none" />


C# code

  1. protected void btnRedirect_Click(object sender, EventArgs e)
  2. {
  3. OnRedirectClicked(sender, "TEXT");
  4. }
  5. public delegate void RedirectClick(object sender, string Speech);
  6. public event RedirectClick RedirectClicked;
  7. protected void OnRedirectClicked(object sender, string Speech)
  8. {
  9. if (RedirectClicked != null) RedirectClicked(sender, Speech);
  10. }
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 407 | Replies: 0
Thread Tools Search this Thread



Tag cloud for C#
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC