View Full Version : Hiding part of the url in the address bar
| Hi all
I have to call an aspx page with two parameters, is there a way to call this page with these two parameters, but hiding the parameters in the address bar?
for example:
Users have to see in the address bar: http://serverx/webApp1/page1.aspx
But the url used to call the page is: http://server1/webApp1/page1.aspx?par1=123&par2=456
Thanks in advance |
Not that I know of. Sorry. If you want to (ASP here, don't know much about ASPX though I understand they're similar) pass anything to the Request.QueryString object, that's how you do it.
Can't you POST your data?
Mull.
pickledAvenger
10-03-02, 08:14
| I would imagine it's possible to pass the parameters using a form, set the method to POST and there should be no query string in the address bar.
If you need info let me know. |
WraithOfDark
10-03-02, 09:56
Save the variables using Application or Session if you are passing from an ASP page.
Just before the Response.Redirect (if thats what your using) add:
Session("par1")=par1
Session("par2")=par2
Then load them on the new page:
par1=Session("par1")
And use them.
This sort of system will work fine if you are passing from an AspX page and the params are static.
Otherwise you can create a Session("params") variable with a list of all the params the destination page has to process. You can then split the params list using Split(), put them to an array and use a 'for each' to run through and load each parameter or load them as needed.
If you're posting from an HTML page or other non AspX source you will have to use forms. You can hide the form fields and use JavaScript to post the form for you.
Thanks for all of you
I prefer not to use session variables because of the memory usage, so I'll try with the post method.
Best regards
vBulletin v3.5.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.