读书人

set temp=server.createobject(quot;scrip

发布时间: 2012-01-20 18:53:53 作者: rapoo

set temp=server.createobject("scripting.dictionary")
set temp=server.createobject("scripting.dictionary")
请问这在C#里该怎么写?
if not isobject(session("temp")) then
set temp=server.createobject("scripting.dictionary")
else
set temp=session("temp")
end if

no=request.querystring("num")
if ffno(no)=0 then
response.write "非法数量"
response.end
end if

if temp.exists(id) and no>0 then
temp(id)=clng(temp(id))+no
elseif no>0 then
temp.add id,no
'tem.add id,xilie
end if

set session("temp")=temp

[解决办法]
ding
[解决办法]
这不是一个Directory对象吗?你直接用.NET中的Directory对象就好了!
[解决办法]

C# code
ClientScriptManager cs = Page.ClientScript;String csname1 = "PopupScript";Type cstype = this.GetType();if (!cs.IsStartupScriptRegistered(cstype, csname1)){    String cstext1 = "var temp=createobject('scripting.dictionary');";    cs.RegisterStartupScript(cstype, csname1, cstext1, true);} 

读书人网 >C#

热点推荐