将查询字符串添加到响应重定向 ASP VB.NET

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/20632276/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-17 16:10:33  来源:igfitidea点击:

Adding query string to response redirect ASP VB.NET

asp.netvb.netquery-stringresponse.redirect

提问by huddds

I'm trying to add the value from my query string to a response redirect. I've added my code below, any help would be great.

我正在尝试将查询字符串中的值添加到响应重定向中。我在下面添加了我的代码,任何帮助都会很棒。

If Boolean.Parse(ConfigurationManager.AppSettings.Item("Development")) Then
            If Request.QueryString("ABC") = "Y" Then
                Session("Website") = "abc"
            End If  
            If Not Request.QueryString("LOCATION") = "" Then
                Response.Redirect "mysite.co.uk/location/" & Request.QueryString("LOCATION")
            End If          
        End If

采纳答案by Joe Ratzer

What happens when you use:

使用时会发生什么:

Response.Redirect("http://mysite.co.uk/location/" & Request.QueryString("LOCATION"))

回答by Vivekh

Response.Redirect("Yourpage.aspx?UserId="+location);