auto postback(urgent!)

S

sunny

Hi everybody,

I have a datagrid and a button(id=Button1). when the user select the row. I
want to excute javascript to invoke "__doPostBack("Button1","")" . just like
the user press the button and do the postback. In reguar aspx, It works
great. But in user control(ascx). because all control's id in the
usercontrol will change (add a prefix for example "abc_Button1"). No matter
I use "__doPostBack("Button1","")" or "__doPostBack("abc_Button1","")" I
can't catch the event( button.click). How can I fix this problem, anyone has
a idea?

Thanks a lot!

Sunny.
 
S

Sonu Kapoor

Try to add the onclick event to the button dynamically.
That way you can find the clientID of the button and pass
it as a parameter to your function.

Good Luck!
Sonu Kapoor
http://kapoorsolutions.com/blog

-----Original Message-----
Hi everybody,

I have a datagrid and a button(id=Button1). when the user select the row. I
want to excute javascript to invoke "__doPostBack ("Button1","")" . just like
the user press the button and do the postback. In reguar aspx, It works
great. But in user control(ascx). because all control's id in the
usercontrol will change (add a prefix for
example "abc_Button1"). No matter
 

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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top