ASP.NET程序中常用的各种代码(2)
摘要:17.数字格式化 【<%#Container.DataItem("price")%>的结果是500.0000,怎样格式化为500.00?】<%#Container.DataItem("price","{0:¥#,##0.00}")%>int i=123456;string s=i.ToString("###,###.00");18.日期格式化 【aspx页面内:<%# DataBinder.Eval(Container.DataItem,"Company_Ureg_Date")%> 显示为: 2
阅读全文
posted @
2012-08-22 09:32
龙猫sun
阅读(187)
推荐(0)
ASP.NET程序中常用的各种代码(1)
摘要:包含转载的或者自己整理的,反正有用就好1. 打开新的窗口并传送参数: 传送参数:response.write("<script>window.open(’*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"’)</script>")接收参数:string a = Request.QueryString("id");string b = Request.QueryString("id1");2.为按钮添加对话框Button1.At
阅读全文
posted @
2012-08-22 09:22
龙猫sun
阅读(123)
推荐(0)