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

 

 ·关于 web.config    »显示摘要«
    摘要: 我使用表单认证,可以实现访问页面的权限,当没有通过验证,自动跳转到log页面。但,通过验证也自动跳转到log页?为什么?使用formsauthentication.redirectfromloginpage,怎么提示我未定义? ......
    摘要: <param name="src" value=<%=tempurl%>> ......


如何设置我计算机上面的时间,我想修改一下。

当然,用用程序,谢谢。

NO.1   作者: TheAres

调用API   SetSystemTime就可以,这是一段代码:  
   
  using   System;  
  using   System.Runtime.InteropServices;  
   
  [StructLayout(LayoutKind.Sequential)]  
  public   struct   SystemTime  
  {  
  public   ushort   wYear;  
  public   ushort   wMonth;  
  public   ushort   wDayOfWeek;  
  public   ushort   wDay;  
  public   ushort   wHour;  
  public   ushort   wMinute;  
  public   ushort   wSecond;  
  public   ushort   wMiliseconds;  
  }  
   
  public   class   Win32  
  {  
  [DllImport("Kernel32.dll")]  
  public   static   extern   bool   SetSystemTime(   ref   SystemTime   sysTime   );  
  [DllImport("Kernel32.dll")]  
  public   static   extern   void   GetSystemTime(ref   SystemTime   sysTime);  
  }  
   
  public   class   TestPInvoke  
  {  
  public   static   void   Main()  
  {  
  SystemTime   sysTime   =   new   SystemTime();  
   
  sysTime.wYear   =   2003;  
  sysTime.wMonth=1;  
  sysTime.wDay=1;  
  sysTime.wHour=1;  
  sysTime.wMinute=1;  
  sysTime.wSecond=1;  
  sysTime.wMiliseconds=1;  
   
  Win32.SetSystemTime(ref   sysTime);  
  }  
  }  
 


 ·如何用string::iterator判断相等    »显示摘要«
    摘要: 比如 string a("hello"); string::iterator i=a.begin(); *i.compare("h"); 但提示出错,请问如何解决? ......
» 本期热门文章:

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