文章分类 -  Asp.Net

同时返回记录总数及数据集
摘要:Code Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> int iRecordCount = 1; Model.UserInfor us = new Model.UserInfor(); ... 阅读全文

posted @ 2008-09-23 16:24 ★金★ 阅读(266) 评论(0) 推荐(0) 编辑

加法计算
摘要:一直很讨厌面试的时候答题,但有的时候一道很简单的题能反映出你的计算机水平。比如就出一道很简单的题目,求值:1+2+......100 ? 很有好几种方法,如下: Code Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->1. int ... 阅读全文

posted @ 2008-08-16 14:23 ★金★ 阅读(156) 评论(0) 推荐(0) 编辑

自己的存储过程结合网上的产生高效的数据列表
摘要:网上的: Code Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->/* 函数名称: GetRecordFromPage 函数功能: 获取指定页的数据 参数说明: @tblName 包含数据的表名 @fldN... 阅读全文

posted @ 2008-08-13 11:57 ★金★ 阅读(158) 评论(0) 推荐(0) 编辑

DataFormatString--格式化字符串
摘要:还要设置HtmlEncode="False" DataFormatString="{0:格式字符串}" 在DataFormatString 中的 {0} 表示数据本身,而在冒号后面的格式字符串代表所们希望数据显示的格式; 数字、货币格式: 在指定的格式符号后可以指定小数所要显示的位数。例如原来的数据为「1.56」,若格式设定为 {0:N1},则输出为「1.5」。其常用的数值格式如下表所示:... 阅读全文

posted @ 2007-11-23 13:53 ★金★ 阅读(189) 评论(0) 推荐(0) 编辑

批量更新GridViewRow中的值
摘要:string strtolmoney = ""; string strid = ""; foreach (GridViewRow row in this.mygvsg1.Rows) { strid += this.mygvsg1.DataKeys[row.RowInde... 阅读全文

posted @ 2007-10-05 17:41 ★金★ 阅读(486) 评论(0) 推荐(0) 编辑

多项选择数据
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.co... 阅读全文

posted @ 2007-09-14 14:49 ★金★ 阅读(210) 评论(0) 推荐(0) 编辑

多个具有相同规律的控件取值
摘要:string str = ""; for(int i=1;i<=2;i++) { str=str+((Label)this.FindControl("txt"+i.ToString())).Text.ToString()+";"; } Response.Write(str); ArrayList l = ne... 阅读全文

posted @ 2007-04-18 14:35 ★金★ 阅读(200) 评论(0) 推荐(0) 编辑

Request.ServerVariables参数集
摘要:Request.ServerVariables("Url") 返回服务器地址 Request.ServerVariables("Path_Info") 客户端提供的路径信息 Request.ServerVariables("Appl_Physical_Path") 与应用程序元数据库路径相应的物理路径 Request.ServerVariables("Path_Translated") 通过由虚拟... 阅读全文

posted @ 2007-03-02 11:59 ★金★ 阅读(160) 评论(0) 推荐(0) 编辑

c#類庫裡面結構
摘要:命名空間( namespace)(類(class),接口(interface),枚舉(enum) )類( 方法(method),屬性(attribute),字段(field),事件(event) ) 不知道哪裡有結構圖,應該有的,不過目前還沒有找到。 阅读全文

posted @ 2006-11-15 19:40 ★金★ 阅读(203) 评论(0) 推荐(0) 编辑

有一個方法可以擁有你喜歡的任何域名
摘要:如今的域名資源非常寶貴,好的域名都被注冊了。特別是有些好的域名根本不開放注冊(兩位的.com域名),QQ 這樣的域名都是花巨資買的。 但有一個方法可以擁有任何你喜歡的域名,不會吧,有這樣的方法,怎麼可能呢?估計是沒有人能夠相信。不要急,說白了就知道了,好多事情都是這樣,了解後才恍然大誤,哦,原來這樣簡單,是這樣的。 1.打開C:\WINDOWS\system32\drivers\etc,找到ho... 阅读全文

posted @ 2006-11-15 12:06 ★金★ 阅读(188) 评论(0) 推荐(0) 编辑

The following table shows the core technology areas of the .NET Framework
摘要:.NET Framework class library ADO.NET Application domains ASP.NET Assemblies Asynchronous programming CodeDom Common language runtime Configuration D... 阅读全文

posted @ 2006-11-14 08:09 ★金★ 阅读(117) 评论(0) 推荐(0) 编辑

利用枚舉把人民幣轉換為大寫
摘要://定义一个枚举类型:数字 enum Number { 零,壹, 贰, 叁, 肆, 伍, 陆, 柒, 捌, 玖 } //定义一个枚举类型:单位 enum UnitPrice_AX_Made_In_China { 圆, 拾, 佰, 仟, 万, 十萬, 百萬, 千萬, 億, 十億, 百億, 千億 } 用法: ... 阅读全文

posted @ 2006-11-04 14:13 ★金★ 阅读(374) 评论(0) 推荐(0) 编辑

枚举2(轉)
摘要:枚举使你能够指定一组对象,例如: 声明: public enum Direction {North, East, West, South}; 使用: Direction wall = Direction.North; 这真是个优雅的概念,这也是C#为什么会决定保留它们的原因,但是,为什么Java却选择了抛弃?在Java中,你不得不这么做: 声明: public class Direc... 阅读全文

posted @ 2006-11-04 09:04 ★金★ 阅读(134) 评论(0) 推荐(0) 编辑

枚举(轉)
摘要:枚举 枚举是一个被命名的整型常数的集合, 枚举在日常生活中很常见。 例如表示星期的SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, 就是一个枚举。 枚举的说明与结构和联合相似, 其形式为: enum 枚举名{ 标识符[=整型常数], ... 阅读全文

posted @ 2006-11-04 09:00 ★金★ 阅读(221) 评论(0) 推荐(0) 编辑

C#中從1加到100,值互換(超級簡單)
摘要:int c=0; for(int i=1;i<=100;i++) { c=c+i; } Response.Write(c); Response.End(); 1+2+3+......+100 int a = 10; ... 阅读全文

posted @ 2006-10-18 14:24 ★金★ 阅读(1306) 评论(0) 推荐(0) 编辑

合并GridView中某列相同信息的行(轉載)
摘要:/**//// /// 合并GridView中某列相同信息的行(单元格) /// /// GridView /// 第几列 private static void GroupRows(GridView GridView1, int cellNum) { int i = 0, r... 阅读全文

posted @ 2006-10-17 11:16 ★金★ 阅读(320) 评论(0) 推荐(0) 编辑

asp.net 2.0 中Global.asax 使用小記
摘要:Asp.Net 2.0中Global.asax文件設置出錯發郵件,記錄到系統日志。發布後發現不起作用,後來才發現隻要加上protected即可。默認沒有,但在調試的時候又可以,不得知。 void Application_Error(object sender, EventArgs e) { }==> protected void Application_Er... 阅读全文

posted @ 2006-10-04 13:30 ★金★ 阅读(1059) 评论(1) 推荐(0) 编辑

C#命名規范
摘要:1.TextBox(txt)2.DropDownList(list)3.RequiredFieldValidator(val)4.Label(lab)5.CheckBox(chk)6.ImageButton(btn)eg:txtFirstName//listCountry//valFirstName//lblFirstName//chkShowFavorites//btnUpdate a、web... 阅读全文

posted @ 2006-06-23 10:11 ★金★ 阅读(415) 评论(0) 推荐(0) 编辑

C#中获取Excel文件的表名
摘要:public static string GetExcelFirstTableName(string excelFileName){ string tableName = null; if (File.Exists(excelFileName)) { using (OleDbConnection conn = new OleDbConnection("Provide... 阅读全文

posted @ 2006-06-23 10:08 ★金★ 阅读(1697) 评论(3) 推荐(0) 编辑

ASP.NET程序中常用的三十三种代码
摘要:ASP.NET程序中常用的三十三种代码 1. 打开新的窗口并传送参数: 传送参数:response.write("<script>window.open(’*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"’)</script>") 接收参数:string a = Request.QueryString("id");str... 阅读全文

posted @ 2006-01-12 16:06 ★金★ 阅读(256) 评论(1) 推荐(0) 编辑

导航

点击右上角即可分享
微信分享提示