摘要:获得当前系统时间:DateTimedt=DateTime.Now;Environment.TickCount可以得到“系统启动到现在”的毫秒值DateTimenow=DateTime.Now;Console.WriteLine(now.ToString("yyyy-MM-dd"));//按yyyy-MM-dd格式输出sConsole.WriteLine(dt.ToString());//26/11/2009AM11:21:30Console.WriteLine(dt.ToFileTime().ToString());//129036792908014024//Convert
阅读全文
摘要:方法A:staticclassExportingCellByCellMethod{publicstaticvoidExportToExcel(DataSetdataSet,stringoutputPath){//CreatetheExcelApplicationobjectApplicationClassexcelApp=newApplicationClass();//CreateanewExcelWorkbookWorkbookexcelWorkbook=excelApp.Workbooks.Add(Type.Missing);intsheetIndex=0;//CopyeachDataTa
阅读全文
摘要:错误信息:无法向会话状态服务器发出会话状态请求。请确保 ASP.NET State Service (ASP.NET 状态服务)已启动,并且客户端端口与服务器端口相同。如果服务器位于远程计算机上,请检查 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\aspnet_state\Parameters\AllowRemoteConnection 的值,确保服务器接受远程请求。如果服务器位于本地计算机上,并且上面提到的注册表值不存在或者设置为 0,则状态服务器连接字符串必须使用“localhost”或“127.0.0.1”作为服务器名称原因分
阅读全文
摘要:在发布silverlight时,报如下错误:Configuration ErrorDescription:An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.Parser Error Message:It is an error to use a section
阅读全文