__doPostBack and NULL __EVENTTARGET?

Discussion in 'ASP .Net Web Controls' started by Serg, Mar 3, 2005.

  1. Serg

    Serg Guest

    Please help out. <asp:LinkButton> control emits <a> tag with an href that
    looks something like below. I am not using server-control, and I am emitting
    <a> tag in Render() method, and I get an error when I try to set
    __EVENTTARGET with my control UniqueId. Is there a way I could mimic the way
    the asp.net creates the __EVENTTARGET so it's not NULL? Thanks!

    <a id="_ucTopNavigation_LinkButton3" href="javascript:{if
    (typeof(Page_ClientValidate) != 'function' || Page_ClientValidate())
    __doPostBack('_ucTopNavigation$LinkButton3','')} ">LinkButton</a>
     
    Serg, Mar 3, 2005
    #1
    1. Advertising

  2. Serg

    Serg Guest

    Ok, I got it, this does it:

    Page.GetPostBackEventReference(this, tab.Tab.ToString());





    "Serg" wrote:

    > Please help out. <asp:LinkButton> control emits <a> tag with an href that
    > looks something like below. I am not using server-control, and I am emitting
    > <a> tag in Render() method, and I get an error when I try to set
    > __EVENTTARGET with my control UniqueId. Is there a way I could mimic the way
    > the asp.net creates the __EVENTTARGET so it's not NULL? Thanks!
    >
    > <a id="_ucTopNavigation_LinkButton3" href="javascript:{if
    > (typeof(Page_ClientValidate) != 'function' || Page_ClientValidate())
    > __doPostBack('_ucTopNavigation$LinkButton3','')} ">LinkButton</a>
     
    Serg, Mar 3, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dan
    Replies:
    9
    Views:
    8,928
    vMike
    Dec 9, 2003
  2. Nuno
    Replies:
    2
    Views:
    8,461
    =?Utf-8?B?Q293Ym95IChHcmVnb3J5IEEuIEJlYW1lcikgLSBN
    Feb 10, 2005
  3. RJN
    Replies:
    1
    Views:
    8,421
    bruce barker
    Mar 15, 2005
  4. where is __EVENTTARGET ?

    , Apr 21, 2005, in forum: ASP .Net
    Replies:
    5
    Views:
    8,503
    Lau Lei Cheong
    Apr 21, 2005
  5. Kenneth Baltrinic
    Replies:
    1
    Views:
    508
    bruce barker
    May 31, 2007
Loading...

Share This Page