做最好的自己~~

Be My Personal Best!

导航

06 2008 档案

生活点滴总结
摘要:1。。。。一般日期显示为: 2004-8-11 19:44:28 在前台页面显示出来我只想要:2004-8-11   可以此名绑定:<%# DataBinder.Eval(Container.DataItem,"字段名","{0:yyyy-M-d}")%> 如果你想只显示年与月,则可以: <%# DataBinder.Eval(Container.DataItem,"字段名","... 阅读全文

posted @ 2008-06-12 22:47 阿万 阅读(700) 评论(2) 推荐(0) 编辑

遍历DataList中每行的简单方法
摘要:我们常常用的方法是: for (int i = 0; i < this.DataList1.Items.Count; i++) { string value = ((Label)this.DataList1.Items[i].FindControl("price")).Text; double price = Convert.To... 阅读全文

posted @ 2008-06-12 22:06 阿万 阅读(2166) 评论(4) 推荐(0) 编辑

SqlCommandBuilder 小示例
摘要:protected void Button5_Click(object sender, EventArgs e) { SqlConnection conn = new SqlConnection("Server=.;Database=test;Integrated Security=SSPI"); conn.Open(); //填充Dat... 阅读全文

posted @ 2008-06-11 21:55 阿万 阅读(742) 评论(3) 推荐(0) 编辑

一个购物车中修改商品数量的实列
摘要://在这个实列中,只要你修改某件商品的数量,就会触发一个TextChanged事件,在这个事件中它会遍历datalist中的每一行,然后得到每一行中的单价,和数量,最后把算出的结果附给总价,每行都这么做。就达到更新的目的了。。 protected void txtCount_TextChanged(object sender, EventArgs e) { double ... 阅读全文

posted @ 2008-06-10 23:28 阿万 阅读(847) 评论(0) 推荐(0) 编辑

转:用Sql Server存储上载图片字体
摘要:在学习Asp.net开发Web应用程序的时候,我遇上这样一个问题.就是我们常见的在网站上传图片,文件之类 的,这在asp.net中似乎很简单,不就一个HttpPostedFile就搞定了吗?呵呵.的确,HttpPostedFile非常方便 的给我们提供了从Local to Host的HttpPostedFile类.但是我在想,可否用数据库来存储这些图片或文件 呢?答案是肯定的,计算机上... 阅读全文

posted @ 2008-06-09 12:50 阿万 阅读(583) 评论(0) 推荐(0) 编辑

利用存储过程生成随机数,并用其它存储过程调用此过程
摘要:--产生随机卡号的存储过程(被其它存储过程调用) if exists(select * from sysobjects where name='proc_randCardID') drop procedure proc_randCardID go create procedure proc_randCardID @randCardID varchar(20) output as declar... 阅读全文

posted @ 2008-06-03 09:34 阿万 阅读(859) 评论(1) 推荐(0) 编辑

自定义分页栏
摘要:using System; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts... 阅读全文

posted @ 2008-06-02 21:17 阿万 阅读(453) 评论(0) 推荐(0) 编辑

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