Loading ...

not getting event of a control resides in master page

Who is online?  0 guests and 0 members
home  »  forums   »  asp.net topics   »  webmatrix   » not getting event of a control resides in master page

not getting event of a control resides in master page

Posts under the topic: not getting event of a control resides in master page

Posted: 10/21/2011

Lurker 5  points  Lurker
  • Joined on: 10/21/2011
  • Posts: 1

Hi,

i am having   <a id="asignout" name="asignout" runat="server" clientidmode="Static"> in master page

and it renders as

<a href="javascript:__doPostBack('ctl00$ctl00$asignout','')" name="asignout" id="asignout">

 

so i am not able to get the event..

any body knows how to get the event of this <a> tag?

please help.. its urgent..

Thank you in adv.


Posted: 10/21/2011

Starter 727  points  Starter
  • Joined on: 6/6/2011
  • Posts: 74

Hi dhara,

This happens when you have musltiple masterpages, or nested one, try to add custom event and a delegate 

public event SignOutHandler aSignOut;
public delegate void MySignOutHandler();

and rise it when the link signout is clicked:

((MyMasterPage)Master).SignOut += new MyMasterPage.SignOutHandler(MyEvent);

Regards,

Gjorgji


Page 1 of 1 (2 items)