gpt4 book ai didi

url - 使用变量的经典 ASP 重定向 URL

转载 作者:行者123 更新时间:2023-12-02 05:27:17 25 4
gpt4 key购买 nike

我有一个来自结果集的变量标记 <%test_variable%>。

我想用这个 <%=test_variable%> 重定向到一个链接,比如

http://www.helloworld.someurl.com/testUrl?somevariable=<%=test_variable%>&test=ok

如何在 <% %> 标签中做到这一点?例如,

<%=test_variable%> 

<%
' I want to redirect the url with the above tag, something like:

Response.Redirect(" http://www.helloworld.someurl.com/testUrl?somevariable=<%=test_variable%>&test=ok")
%>

但我不认为我们可以有“嵌套标签”,对吧?

我是 ASP 的新手。

最佳答案

<%= %><% Response.Write(" ... "); %> 的简写:

http://www.helloworld.someurl.com/testUrl?somevariable=<%=test_variable%>&test=ok

在你澄清之后:

<%
Response.Redirect("http://www.helloworld.someurl.com/testUrl?somevariable="
+ test_variable
+ "&test=ok");
%>

关于url - 使用变量的经典 ASP 重定向 URL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12888515/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com