Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_beginners thread: Reading URL parameters from Page_Load event


Message #1 by "Richard Ward" <richbward@h...> on Tue, 07 Jan 2003 16:02:27 -0500
I'd like to be able to read parameters contained in the url, preferably from 
the Page_Load event.  I would think this would be a very basic task but I 
can't find anything.  Obviously I'm looking in all the wrong places.

Example:


http://rward-bes01/GroupCal/GroupCal.aspx?trial=MK00067?domain=BESCDMP?exserver=MRDEV1?user=rward?pwd=rward

From the Page_Load event I'd like to be able to get the trial, 
domain,exserver, user and pwd args.  I am thinking that 'e As 
System.EventArgs' object would contain this data.

And obviously, I'd like to figure out how to obfuscate the user/pwd info!

Any wisdom on this would be greatly appreciated.

All the best,

Richard Ward


_________________________________________________________________
MSN 8: advanced junk mail protection and 2 months FREE*. 
http://join.msn.com/?page=features/junkmail

Message #2 by "Mitchell Adams" <MADAMS@p...> on Tue, 07 Jan 2003 16:41:28 -0500
Sub Page_Load()

Dim trial as String
trial =3D Request.QueryString("trial")

End Sub

>>> richbward@h... 01/07/03 04:02PM >>>
I'd like to be able to read parameters contained in the url, preferably 
from
the Page_Load event.  I would think this would be a very basic task but 
I
can't find anything.  Obviously I'm looking in all the wrong places.

Example:


http://rward-bes01/GroupCal/GroupCal.aspx?trial=3DMK00067?domain=3DBESCDMP?
exserver=3DMRDEV1?user=3Drward?pwd=3Drward

From the Page_Load event I'd like to be able to get the trial,
domain,exserver, user and pwd args.  I am thinking that 'e As
System.EventArgs' object would contain this data.

And obviously, I'd like to figure out how to obfuscate the user/pwd info!

Any wisdom on this would be greatly appreciated.

All the best,

Richard Ward


_________________________________________________________________
MSN 8: advanced junk mail protection and 2 months FREE*.
http://join.msn.com/?page=3Dfeatures/junkmail


to unsubscribe send a blank email to leave-aspx_beginners-1132475L@p...
.com.

Message #3 by "Richard Ward" <richbward@h...> on Tue, 7 Jan 2003 22:09:04
Mitchell -

Many thanks!  Er, just one more question:  When I'm stepping through the 
code, how do I prepopulate the url with the parameters?

All the best,

- Rich
Message #4 by "Patterson, Stephanie L" <stephanie.l.patterson@i...> on Tue, 7 Jan 2003 15:25:51 -0800
I have done it this way (where strParam1 and strParam2 are the values I'm
wanting to pass):

  Response.Redirect("xxx.aspx?Param1=" & strParam1 & "&Param2=" & strParam2)

Does anyone know if there is there a better way?

Stephanie

-----Original Message-----
From: Richard Ward [mailto:richbward@h...]
Sent: Tuesday, January 07, 2003 2:09 PM
To: aspx_beginners
Subject: [aspx_beginners] Re: Reading URL parameters from Page_Load
event


Mitchell -

Many thanks!  Er, just one more question:  When I'm stepping through the 
code, how do I prepopulate the url with the parameters?

All the best,

- Rich
Message #5 by "Alex Smotritsky" <alex.smotritsky@v...> on Tue, 7 Jan 2003 20:47:36 -0500
When your stepping thru the code you just use your app (it will be in
debug mode) and let the app populate the url as it normally would and
you break or whatever wherever you want.


-----Original Message-----
From: Patterson, Stephanie L [mailto:stephanie.l.patterson@i...] 
Sent: Tuesday, January 07, 2003 6:26 PM
To: aspx_beginners
Subject: [aspx_beginners] Re: Reading URL parameters from Page_Load ev
ent


I have done it this way (where strParam1 and strParam2 are the values
I'm wanting to pass):

  Response.Redirect("xxx.aspx?Param1=" & strParam1 & "&Param2=" &
strParam2)

Does anyone know if there is there a better way?

Stephanie

-----Original Message-----
From: Richard Ward [mailto:richbward@h...]
Sent: Tuesday, January 07, 2003 2:09 PM
To: aspx_beginners
Subject: [aspx_beginners] Re: Reading URL parameters from Page_Load
event


Mitchell -

Many thanks!  Er, just one more question:  When I'm stepping through the

code, how do I prepopulate the url with the parameters?

All the best,

- Rich


Message #6 by TealeA3115@a... on Fri, 31 Jan 2003 08:54:10 EST
       Just an idea, but you may be able to use the Server
       Object methods:
       
             Transfer, Execute
       
AT.


  Return to Index