摘要:在提交页面之后,保持滚动条的位置 可以在 page 指令上加上 MaintainScrollPositionOnPostback 指令 < %@ Page Language ="C#" MaintainScrollPositionOnPostback ="true" AutoEventWireup ="true" CodeFile ="..." Inherits ="..." % > ...
阅读全文
摘要:存储过程:代码===========================================================.cs文件:代码=================================================aspx文件:代码====================================================文章引用于http://www....
阅读全文
摘要:只是做一个例子,别的可以仿照下面的例子改改就好了。代码
阅读全文
摘要:UserPower为用户的权限,我这里是int类型的。学生为0,老师为1,专家为3,管理员为4。返回值是用户的状态,只不过状态中的值,有部分是用户的权限值。代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--CREATE proc Proc_UserL...
阅读全文
摘要:TextboxName.BackColor =System.Drawing.ColorTranslator.FromHtml(DropDownListID.SelectedValue)
阅读全文
摘要:1.DDL (Data Definition Language )数据库定义语言 statements are used to define the database structure or schema. DDL是SQL语言的四大功能之一。用于定义数据库的三级结构,包括外模式、概念模式、内模式及其相互之间的映像,定义数据的完整性、安全控制等约束DDL不需要commit. CREATE ALTE...
阅读全文
摘要:document.getElementById("Hid").value其中Hid为控件的ID
阅读全文
摘要:CSS字体属性可定义文字所使用的字体。设置文字的字体实例:代码设置字体的大小实例:代码设置字体的款式实例:代码设置字体的形态实例:代码设置字体粗细实例:代码一个声明设置一切字体属性实例:[代码]
阅读全文
摘要:前台代码:[代码]后台代码:[代码]<form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <asp:UpdatePanel ID="UpdatePanel1" runat="server">...
阅读全文
摘要:1、DateTime 数字型 System.DateTime currentTime=new System.DateTime(); 1.1 取当前年月日时分秒 currentTime=System.DateTime.Now; 1.2 取当前年 int 年=currentTime.Year; 1.3 取当前月 int 月=currentTime.Month; 1.4 取当前日 in...
阅读全文
摘要:1、Excel数据导入到数据库中://该方法实现从Excel中导出数据到DataSet中,其中filepath为Excel文件的绝对路径,sheetname为表示那个Excel表; public DataSet ExcelDataSource( string filepath , string sheetname ) ...{ string strConn; strConn = "Provider...
阅读全文
摘要:具体要注意的: 1.应尽量避免在 where 子句中对字段进行 null 值判断,否则将导致引擎放弃使用索引而进行全表扫描,如: select id from t where num is null 可以在num上设置默认值0,确保表中num列没有null值,然后这样查询: select id from t where num=0 2.应尽量避免在 where 子句中使用!=或<>操作...
阅读全文