摘要:
监控公司局域网的网站访问情况。 项目1: 新建类MonitorHttpModule.cs Code Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ ... 阅读全文
摘要:
quote:Erik Lenaerts(http://www.dotnet6.com/blogs/erik_lenaerts/archive/2007/07/21/run-a-http-response-filter-together-with-an-ajax-update-panel.aspx)R... 阅读全文
摘要:
要在GridView中动态绑定附件,如果附件存在且为图片时,显示该图片,并且建立超链接;如果附件不是图片,则只显示附件名称,建立超链接;Html 代码:span> asp:HyperLink ID="lnkAttachment" runat="server" NavigateUrl='' Targ... 阅读全文
摘要:
当地址栏没有参数"id"时: Request.QueryString["ID"] == nullConvert.ToString(Request.QueryString["ID"]) == null注意这样会出错:Request.QueryString["ID"].ToString(); 当地... 阅读全文
摘要:
在标签外侧添加: PRE>asp:Labelid="lblDescription"runat="server"Width="420px">asp:Label>PRE>在Page_Load中添加: this.lblDescription.Style.Add("word-break","break-al... 阅读全文
摘要:
类: CheckCode.csCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->1//----------------------------------... 阅读全文
摘要:
由于项目需要制作程序发布的网站,需要手动选择服务端目录下的文件夹和文件。故制作该页面,并打算转为UserControl.页面代码: AppFileSelect.aspxCode highlighting produced by Actipro CodeHighlighter (freeware)ht... 阅读全文
摘要:
使用UserControl实现。同时在用户控件上定义了委托,以实现与基页面的事件相结合。VS2005(Asp.net Ajax)前端代码: CodeCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.C... 阅读全文
摘要:
/// /// 导出到Excel /// /// /// public static void DataGridViewToExcel(DataGridView dgv, string title) { if (dgv.DataSource == null || dgv.Columns... 阅读全文
摘要:
/// /// 获取计时器事件运行的时间间隔 /// /// 时间间隔 private double GetTimerInterval() { DateTime runTime = Convert.ToDateTime(System.Configuration.ConfigurationSet... 阅读全文
摘要:
转自http://soft.zdnet.com.cn/software_zone/2007/0607/407672.shtml 封锁技术可以有效地解决并行操作的一致性问题,但也带来一些新的问题,即死锁和活锁的问题。 (1)活锁 如果事务T1封锁了数据对象R后,事务T2也请求封锁R,于是T2等待。接着... 阅读全文
摘要:
页面验证未通过,需要跳转到Login页面,为防止Login页面被嵌入到IFrame中,需在Login页面的HTML源码的与之间加入如下代码,即可实现整个页面的跳转。 页面跳转是使用如下:Response.Write(""); 阅读全文
摘要:
在存储过程中使用事务,以下为模板: CREATE PROCEDURE testProAS /**//* ------- 事务开始---------- */ BEGIN TRANSACTION tran_test /**//* -------- 保存事务----------*/ SAVE TRANS... 阅读全文
摘要:
--建立数据库连接,'test'为别名 exec sp_addlinkedserver 'test','','MSDASQL',NULL,NULL, 'DRIVER={SQL Server};SERVER=192.168.0.4;UID=developer;PWD=123456;' --数据库登录... 阅读全文
摘要:
/// /// 强行杀Excel进程/// private static void KillProcess(){ System.Diagnostics.Process[] excelProc = System.Diagnostics.Process.GetProcessesByName("EXCEL... 阅读全文
摘要:
1. aspx页面端代码: 首页 上一页 下一页 尾页 页码: / 2. aspx.cs端代码: #region GridView分页 /// /// 页面选择操作 /// /// /// protected void PagerButton_Click(object sende... 阅读全文
摘要:
/// /// 将DataSet内容导入到Excel /// /// DataSet public static void FACTDataSetToExcel(System.Data.DataSet dsExport,string _fileName) { //保存文件名 string ... 阅读全文
摘要:
string _fileName = HttpContext.Current.Server.MapPath("~\\report\\FactReports\\") + e.Item.Cells[0].Text.Trim(); //服务器端文件路径 //建立文件对象 FileStream myFil... 阅读全文
摘要:
取系统时间的日期部分: TRUNC(SYSDATE) to be continued..... 阅读全文
摘要:
常用oracle函数SQL中的单记录函数1.ASCII返回与指定的字符对应的十进制数;SQL> select ascii('A') A,ascii('a') a,ascii('0') zero,ascii(' ') space from dual; A A ZERO SPACE--------- ... 阅读全文
摘要:
形式 语法 结果 注释 数字 {0:N2} 12.36 数字 {0:N0} 13 货币 {0:c2} $12.36 货币 {0:c4} $12.3656 货币 "¥{0:N2}" ¥12.36 科学计数法 {0:E3} 1.23E+001 百分数 {0:P} 12.25% P and p prese... 阅读全文