Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > auto postback(urgent!)

Reply
Thread Tools

auto postback(urgent!)

 
 
sunny
Guest
Posts: n/a
 
      01-29-2005
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.


 
Reply With Quote
 
 
 
 
Sonu Kapoor
Guest
Posts: n/a
 
      01-30-2005
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
>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.
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto Shipping Auto Shipping Scheduling:car moving auto transport linkswanted ASP .Net 1 11-22-2013 07:02 AM
Auto-Suggested Textbox like google auto suggest =?Utf-8?B?V2FyYW4=?= ASP .Net 1 07-27-2007 03:56 AM
auto start, and auto replay possible? Dik Mus DVD Video 3 10-28-2003 12:09 PM



Advertisments