__doPostBack and NULL __EVENTTARGET?

S

Serg

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

Serg

Ok, I got it, this does it:

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

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,480
Members
44,900
Latest member
Nell636132

Latest Threads

Top