摘要:Server=localhost;DataBase=AdSearch;Uid=;Pwd=
阅读全文
随笔分类 - C# / Asp.net
摘要:1,在UserControl里定义delegatepublicdelegatevoidSearchHandle(objectsender,EventArgse);publiceventSearchHandleSearchEvent; protected void btnSearch_ServerClick(object sender, System.EventArgs e) { if(Search...
阅读全文
摘要:ASP.Net中让网页“立即过时” 让网页“立即过时”有时候是一个很有用的功能,比如防止用户使用后退来破坏程序逻辑;程序主动刷新某个页面等等。在ASP中最有效的方法是: Response.CacheControl="no-cache" 就这么一句足矣,Response.Expires=-1之类的其实都不需要,也不符合我们的要求。 但到了ASP...
阅读全文
摘要:1. 打开新的窗口并传送参数: 传送参数:response.write("<script>window.open(’*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"’)</script>") 接收参数:string a = Request.QueryString("id");string b = R...
阅读全文
摘要:原文 约定: 1.”attribute”和”attributes”均不翻译 2.”property”译为“属性” 3.msdn中的原句不翻译 4.”program entity”译为”语言元素” Attributes in C# 介绍 Attributes是一种新的描述信息,我们既可以使用attributes来定义设计期信息(例如 帮助文件,文档的URL...
阅读全文
摘要:using System;using System.Collections;using System.ComponentModel;using System.Data;using System.Drawing;using System.Web;using System.Web.SessionState;using System.Web.UI;using System.Web.UI.WebContr...
阅读全文
摘要:String StrName = System.IO.Path.GetFileName(TObj.ClientFilePath); String StrPath = MapPath(Request.ApplicationPath + TObj.VirtualFilePath); Fi...
阅读全文
摘要:选择自 njbaige 的 BlogLog4Net使用指南 1 简介 1.1 Log4net的优点: 几乎所有的大型应用都会有自己的用于跟踪调试的API。因为一旦程序被部署以后,就不太可能再利用专门的调试工具了。然而一个管理员可能需要有一套强大的日志系统来诊断和修复配置上的问题。 经 验表明,日志记录往往是软件开发周期中的重要组成部分。它具有以下几个优点:它可...
阅读全文
摘要:首先是数据访问层的代码: 1using System; 2using System.Data; 3using System.Data.SqlClient; 4using System.Configuration; 5 6namespace WebTest.Common 7{ 8 /**//// 9 /// COperator 的摘要说明。 10 /// 1...
阅读全文

浙公网安备 33010602011771号