Solved

How use tilda in respone.redirect

Posted on 2012-03-29
2
383 Views
Last Modified: 2012-03-29
Is it possible to add https:// to response.redirect("~/order form.aspx") I use the same codebehind for several web sites and I use response.redirect("~/order form.aspx")  so the code can be easly used between different sites. Problem is some sites are secure. so i want to add https:// to the response.redirect("~/order form.aspx") . ANy ideas how I can do this?
0
Comment
Question by:whiwex
2 Comments
 
LVL 16

Accepted Solution

by:
SriVaddadi earned 500 total points
ID: 37785375
var url = String.Format("https://{0}{1}",  
      Request.ServerVariables["HTTP_HOST"] ,
      ResolveUrl("~/order form.aspx"));
 
      Response.Redirect(url);
0
 

Author Closing Comment

by:whiwex
ID: 37785555
Thanks That worked great
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now