Handling PostBacks in UserControls, __doPostBack() ?

  • Thread starter Thread starter Michael Ramey
  • Start date Start date
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
 
The following method will create the __doPostBack javascript for a specific control.

Page.GetPostBackClientEvent

Tommy,
 
Back
Top