当前位置: 代码迷 >> ASP >> 简单有关问题:一个ASP的写法不知道如何写
  详细解决方案

简单有关问题:一个ASP的写法不知道如何写

热度:287   发布时间:2013-01-22 10:23:54.0
简单问题:一个ASP的写法不知道怎么写
前一个页面有变量“id”赋值:
<%
id=999
%>

在接收页面,需要对一个变量"test+id"赋值为:"xxxx 555"
<%
test&id="xxxx 555"
%>


上面的写法不正确。

不知道正确的应该怎么写呢?谢谢

------解决方案--------------------
<%
exectue("test"&id&"=""xxxx 555""")
%>
------解决方案--------------------
<%
Dim id
id=999
execute("test"&id&"=""xxxx 555""")
response.write eval("test"&id)
%>
------解决方案--------------------
这个建议使用dictionary。可以很好地实现你的要求。
------解决方案--------------------
在前一个页面:
<%
Dim id
id=999
%>

在接收页面:
<%
execute("test"&id&"=""xxxx 555""")
%>

即可! 

以后引用此变量,用<%=test999%>即可!
  相关解决方案