Handling PostBacks in UserControls, __doPostBack() ?

M

Michael Ramey

Howdy,

I'm writing a User Control that will operate like windows explorer (file
browing through directories) I'm making it so it will have the ability to
delete files as well, and to do that I'm going to associate an image next to
the filename that you click, that will raise a "delete" event. There could
be from 0 to 100+ of these images based on the number of files in a given
subdirectory.

I'd want to handle this delete event within the user control itself, but i'm
unsure where to begin as far as setting these images to cause a postback
when you click them. I would assume I can tap into what asp.net does with
their controls, tapping into the __doPostBack function. I'm not sure if I
need to manually call __doPostBack, or is there something I can use so
asp.net would write this out for me.

Any help would be appreciated!
--Michael
 
T

Tommy

The following method will create the __doPostBack javascript for a specific control.

Page.GetPostBackClientEvent

Tommy,
 

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,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top