首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

set temp=server.createobject("scripting.dictionary")解决方案

2012-01-20 
set tempserver.createobject(scripting.dictionary)set tempserver.createobject(scripting.diction

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

热点排行