当前位置:首页
开发技术指南» 文章正文
    引言:
 

 

 ·如何隱藏硬盤呀    »显示摘要«
    摘要: 我的硬盤分了四個區, c,d,e,f , 我現在想把后面兩個隱藏起來, 不想下載軟件, 有沒有其它的辦法呀?? ......
    摘要: 主要是动态修改网页中的javascript脚本。 我想实现用webbrowser2浏览网页。 对网页中的alert()等javasctipt函数禁止它运行。 用mshtml如何实现。 应该在哪个事件(ondownloadcomplete , onbeforenavigage, ondocumentcomplete,ondocumentbegin...)里面添加代码? 谢谢。 ......


我在webservice中定义了两个WebMethod,在测试这个webservice时还好好的,session传递的很好,但在页面中调用login时,在testSession()就

我在webservice中定义了两个WebMethod,在测试这个webservice时还好好的,session传递的很好,但在页面中调用login时,在testSession()就显示不了session的值了,怎么回事呀????    
  [WebMethod(EnableSession=true)]  
  public   string   login(string   phoneNum,string   pwd)  
  {  
  myConn=new   SqlConnection(strConn);  
  myConn.Open();  
  FormsAuthentication.HashPasswordForStoringInConfigFile(pwd.Text,   "sha1");  
  strSQL="select   *   from   ESM_GroupUser   where   RegPhone="+phoneNum+"and   Passwd="+pwd+"";  
  myCommand=new   SqlCommand(strSQL,myConn);  
  reader=   myCommand.ExecuteReader();  
  if(reader.Read())  
  {  
  reader.Close();  
  Session["login"]=phoneNum;    
  return   (string)Session["login"];  
  }  
  else  
  {  
  reader.Close();  
  return   null;  
  }    
   
  [WebMethod(EnableSession=true)]   //测试login的值的  
  public   string   testSession(   )  
  {  
  if   (Session["login"]==null)  
  return   null;  
  else  
  return   (string)Session["login"];  
  }

NO.1   作者: lmdhit

你的代码我当作学习了

NO.2   作者: mmvr

mark


 ·高分求图片上传代码    »显示摘要«
    摘要: 高分求图片上传代码,谢谢 ......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE