HttpModules

  • Thread starter Thread starter shiv
  • Start date Start date
S

shiv

Hi all,

I need to determine which control was clicked on a page
when i am dealing with OnPostrequesthandler event in the
HttpModule Class. I don't want to use hardcoded names in
the Httpmodule class. What i want in httpmodule class is
that depending upon whats clicked on the page (Add or
Update or Delete) i would like to enter some distinct data
into the database depending upon the user action.

How to acheive this?

Thanks in advance
regards
shiv
 
you don't really have enough information on the postback to do this in the
general case. postback events are handled in two ways.

1) if the control post back is an <asp:button> or <asp:imagebutton> then
postback is a standard html postback. the name of the control and its value
will appear post variables. unless you standardize the naming convetion for
submit buttons, you can not tell them from any other form field.

2) all other control postback by putting their name in the hidden field
"__EVENTTARGET". these are easy to detect.

-- bruce (sqlwork.com)
 
Back
Top