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);
}