Try response .Redirect and pass the values using querey string values. To the best of my knowledge Server.Transfer works only with web pages that are in the same application,
Jeev
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you get the answer to your question, please mark it as the answer.
Server.Transfer simply runs another page with current url, hence url wont change. Its not good if you want to pass querystring to another page. Simple avoid server.transfer.
Use Response.redirect("mysite.com/mypage?id=otherpage")
This would pass querystring to another page, or another site.
Now on other side, do a request.querystring and process according to your logic.
but when i use redirect it will move me into the page as soon the command has been executed
i want the user to have the choice which item he want and to click on it, when he does that that page transders him to another page with the number of the item he just pick
Then you can either set the destination url for an asp:hyperlink or you can have a button with a response.redirect in your code behind trigger function.
naboot
Member
5 Points
23 Posts
passing variables between web sites
May 16, 2008 10:59 AM|LINK
can some one help me transfer variables between two web sites, i know there are three ways, but vs 2008 is doing me hard time with the url address.
and this is the code :Server.Transfer("
http://localhost:58154/update_pnia.aspx"); this is the url i get when i run the web page.*update_pnia.aspx=update_pnia.aspx
this is the error i get "Invalid path for child request 'http://localhost:58154/update_pnia.aspx'. A virtual path is expected."
tnx once again.
pavipinnaman...
Member
446 Points
106 Posts
Re: passing variables between web sites
May 16, 2008 11:19 AM|LINK
Server.Transfer("update_pnia.aspx");
should be used instead of the one you have given
Pavithru Pinnamaneni
Jeev
All-Star
24182 Points
3719 Posts
Re: passing variables between web sites
May 16, 2008 11:28 AM|LINK
Try response .Redirect and pass the values using querey string values. To the best of my knowledge Server.Transfer works only with web pages that are in the same application,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you get the answer to your question, please mark it as the answer.
dinesh_sp
Contributor
2272 Points
413 Posts
Re: passing variables between web sites
May 16, 2008 11:33 AM|LINK
Hi Naboot,
Server.Transfer simply runs another page with current url, hence url wont change. Its not good if you want to pass querystring to another page. Simple avoid server.transfer.
Use Response.redirect("mysite.com/mypage?id=otherpage")
This would pass querystring to another page, or another site.
Now on other side, do a request.querystring and process according to your logic.
Hope this helps.
rajeshthanga...
Participant
1672 Points
254 Posts
Re: passing variables between web sites
May 16, 2008 01:38 PM|LINK
You have to use webservices to pass the values between two websites
Rajesh Thangarasu
Microsoft Certified Technology Specialist (MCTS)
Microsoft Certified Application Developer (MCAD)
vinz
All-Star
126946 Points
17922 Posts
MVP
Re: passing variables between web sites
May 16, 2008 01:45 PM|LINK
Try using Response.Redirect as suggested and use the Machine name instead on the LocalHost..
Response.Redirect("http://MyComputerName/update_pnia.aspx");
PS: Just be sure that the web site you are accessing is deployed in the web server for you to access it..
MessageBox Controls for WebForms | Blog | Twitter | Linkedin
naboot
Member
5 Points
23 Posts
Re: passing variables between web sites
May 16, 2008 05:01 PM|LINK
but when i use redirect it will move me into the page as soon the command has been executed
i want the user to have the choice which item he want and to click on it, when he does that that page transders him to another page with the number of the item he just pick
can u help me with that?
mankey
Member
32 Points
6 Posts
Re: passing variables between web sites
May 16, 2008 10:05 PM|LINK
Then you can either set the destination url for an asp:hyperlink or you can have a button with a response.redirect in your code behind trigger function.
naboot
Member
5 Points
23 Posts
Re: passing variables between web sites
May 16, 2008 10:48 PM|LINK
tnx