文章分类 -  asp.net

asp.net 制作条码
摘要:抄袭别人的,源地址找不到了,,效果如下,不知道能不能被扫描 public string bar_code(object str, int ch, int cw, int type_code) { string strTmp=str.ToString(); string code=strTmp; strTmp=strTm... 阅读全文
posted @ 2006-11-17 18:01 huazi4995 阅读(250) 评论(0) 推荐(0)
子页面关闭时执行父页面的Button操作
摘要:两个页面refest.aspx与refestAdd.aspx,在refest.aspx打开一个新的页面refestAdd.aspx,在页面refestAdd.aspx中新增一条数据后关闭refestAdd.aspx页面,在关闭refestAdd.aspx的同时执行refest.aspx页面的按钮的Click操作。 private void Button2_Click(object sender, ... 阅读全文
posted @ 2006-11-07 14:14 huazi4995 阅读(381) 评论(0) 推荐(0)
把阿拉伯数字转换为中文大写
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->static protected string IntToWord(string intStr) { string wordStr; wordSt... 阅读全文
posted @ 2006-11-01 14:54 huazi4995 阅读(431) 评论(0) 推荐(0)
dropdownlist里实现树状结构
摘要:有时,dropdownlist里也需要和treeview里一样的上下级关系,比如部门之间就有一个上下级的关系,在dropdownlist 里我是这样实现的(原创). Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->#region int ... 阅读全文
posted @ 2006-10-28 10:04 huazi4995 阅读(230) 评论(0) 推荐(0)
翻页控件(AspNetPager控件翻页绑定)
摘要:AspNetPager控件是一个比较好的翻页控件,只需要传入一个参数(总记录数)就可以将数据绑定到AspNetPager上了. 翻页时,传入当前页的索引以及每页的记录数就可以了.下面是一段简单的代码: if(!Page.IsPostBack) { AspNetPager1.RecordCount=GetRecordCount(); ... 阅读全文
posted @ 2006-10-23 14:46 huazi4995 阅读(977) 评论(1) 推荐(0)
给DATAGRID的某一列增加总计
摘要:源代码: 1using System; 2using System.Collections; 3using System.ComponentModel; 4using System.Data; 5using System.Drawing; 6using System.Web; 7using System.Web.SessionState; 8using System.Web.UI... 阅读全文
posted @ 2006-10-17 17:18 huazi4995 阅读(316) 评论(0) 推荐(0)
在WebForm1里单击按钮弹出新页面WebForm2,在WebForm2输入数据后返回WebForm1
摘要:在WebForm1。aspx页面放一个文本框(TextBox1)和一个按钮写一个JavaScript函数 1 在WebForm2。aspx页面也放一个文本框(TextBox1) 和一个按钮(btn),在文本框内输入一个数字后,点击按钮将值传入WebForm1 的文本框内 1 1private void btn_Click(object sender, System.EventArgs e)2{3 ... 阅读全文
posted @ 2006-10-17 14:03 huazi4995 阅读(652) 评论(0) 推荐(0)
给datagrid增加一排序列
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1private void GetDataSql() 2 { 3 string strCon="data source=localhost;uid=sa;pwd=;d... 阅读全文
posted @ 2006-10-17 10:32 huazi4995 阅读(154) 评论(0) 推荐(0)
如何判断文本框不能输入中文
摘要:前段时间,为了寻找判断文本框不能输入中文颇费了些文章,终于让我找到了一个最简单的方法,特记下来,也希望高手给指点指点.Private bool ChangeByte(string str){ //确定字符长度 int i=str.Length; //确定字节长度,一个中文占两个字节 byte[] b=Encoding.Default.GetBytes(str); int m=b... 阅读全文
posted @ 2006-10-15 09:29 huazi4995 阅读(627) 评论(0) 推荐(0)
Treeview的递归绑定
摘要:数据库字段定义 IIDD(numberic) PARENTIIDD(numberic) TYPE(varchar) 源代码: 1using System; 2using System.Collections; 3using System.ComponentModel; 4using System.Data; 5using System.Draw... 阅读全文
posted @ 2006-10-12 18:11 huazi4995 阅读(382) 评论(1) 推荐(0)