-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: suj
Message 3 in Discussion

Hi group,

This Server.transfer is giving me a lot of problem.

I want actual name of the page in my http module. I added a hidden field
but when I am accessing it via app.Request.Form.Keys.Count(), I am
getting the false page name as request gives me wrong page ... which is
precisely the page url in the browser address bar.

Any thoughts?

Regards,

Sujay

-----Original Message-----
From: SitaramanM [mailto:[EMAIL PROTECTED] 
Sent: Saturday, August 30, 2003 11:16 AM
To: BDOTNET
Subject: Re: Catching events in HTTP Module

-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: SitaramanM
Message 2 in Discussion

Hi   If i got it right,  wat u want is a mechanism by which in the
page_load itself, u want to ind out which button was clicked and perform
some operations internally and then continue with the default button
click event.  Is tht right???  There is an easy way for doing this.
When you submit a page in a ASP.Net, wat happens is that,  the Caption
of the (only the )button tht you clicked will be always be sent in the
request .  For the other buttons the caption is not passed in the
request.  For e.g.   Assume you have a WebForm1.aspx You have 2 buttons
Button1(Caption = ButtonText1) and Button2(Caption = ButtonText2) In the
Page_Load you can check for the Request.Form(Button1) and
Request.Form(Button2)  as follows.       Private Sub Page_Load(ByVal
sender As System.Object, ByVal e As System.EventArgs) Handles
MyBase.Load CheckClickedButton ... ... ... end sub   sub
CheckClickedButton()      if not Request.Form(Button1) is nothing
AndAlso Request.Form(Button1) <> "" then            'Will enter this
section if Button1 was clicked as "ButtonText1" will be passed as the
value of Request.Form(Button1)            Do the Processing that needs
to be done when Buton1 is clicked.      elseif not Request.Form(Button2)
is nothing AndAlso Request.Form(Button2) <> "" then           'Will
enter this section if Button2 was clicked as "ButtonText2" will be
passed as the value of Request.Form(Button2)             'Do the
Processing that needs to be done when Buton2 is clicked      end if end
sub Should be able to use the same in the HTTPModule also as you anyways
have access to the request object.    hth   regards,   sr

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your
E-mail Settings.
http://groups.msn.com/BDotNet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport
Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if
you received this message by mistake, please click the "Remove" link
below. On the pre-addressed e-mail message that opens, simply click
"Send". Your e-mail address will be deleted from this group's mailing
list.
mailto:[EMAIL PROTECTED]


-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/BDotNet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to