- 博客(12)
- 资源 (7)
- 收藏
- 关注
原创 Select case in LINQ
how can I translate this into LINQ?select t.age as AgeRange, count(*) as Usersfrom ( select case when age between 0 and 9 then ' 0-25' when age between 10 and 14 then '26-40' when a
2013-06-23 21:42:44 3513
转载 ClientScript.RegisterStartupScript()与ScriptManager.RegisterStartupScript()
page类:1、页头中inherits标识继承于哪个类。partial标识局部的,类的一部分,编译的时候 把同名的partial合并成一个完整的class文件,然后编译成中间文件。2、.net页面的生命周期,控件的生命周期,生命周期的应用。页面-属性-document-trace设为true,运行页面可以看到跟踪信息。3、统一验证身份的方法,写一
2013-06-23 21:39:25 2802
转载 asp.net获取当前页面文件名,参数,域名等方法。统一session验证和权限验证的方法
ASP.net后台获取当前页面的文件名System.IO.Path.GetFileName(Request.Path).ToString(); 获取当前页面文件名,参数,域名等方法假设当前页完整地址是:http://www.test.com/aaa/bbb.aspx?id=5&name=kelli"http://"是协议名"www.test.com"
2013-06-23 21:37:24 744
转载 GridView、Datalist中使用FindControl
最近用到FindControl和GridView,整理了一下几种使用方法。1、在选择(SelectedIndexChanged)事件中使用 //获得被选择行的TextBox1 protected void gv1_SelectedIndexChanged(object sender, EventArgs e) { //Control
2013-06-23 21:33:22 3255
原创 如何修改Gridview中HeaderTemplate中控件的值
GridView1.HeaderRow.FindControl(控件名),老提示未将对象引用设置到对象的实例。GridView1.Rows[GridView1.EditIndex].FindControl("txtStuName") as TextBox;这样的GridView1.HeaderRow.FindControl(控件名)这句话应该在 GridView1 绑定数据源后
2013-06-23 21:31:57 2999
原创 传参方式
public void CreateSqlCommand(SqlConnection myConnection, string queryString, SqlParameter[] paramArray) { SqlCommand command = new SqlCommand(queryString, myConnection); command.CommandTe
2013-06-20 10:08:00 581
转载 jquery设置元素的readonly和disabled
jquery设置元素的readonly和disabledJquery的api中提供了对元素应用disabled和readonly属性的方法,在这里记录下。如下: 1.readonly $('input').attr("readonly","readonly")//将input元素设置为readonly $('input').removeAttr("readonly"
2013-06-19 15:47:38 702
原创 jQuery编辑框控制
function setparentmodule() { if ($("#").val().length == 2) { $("#").val("0"); $("#").attr("disabled", "disabled"); $("#").cs
2013-06-19 15:40:02 1282
转载 常用数据字段区别
nvarchar与varchar的区别varchar[(n)] 长度为 n 个字节的可变长度且非 Unicode 的字符数据。n 必须是一个介于 1 和 8,000 之间的数值。存储大小为输入数据的字节的实际长度,而不是 n 个字节。所输入的数据字符长度可以为零。varchar 在 SQL-92 中的同义词为 char varying 或 character varying。
2013-06-19 11:23:23 904
原创 C#调用前端javascript的方法
第一种,OnClientClick (vs2003不支持这个方法)server" Text="Button" nClientClick="client_click()" nClick="Button1_Click" />client_click() 就是javascript的一个方法。第二种,Button1.Attributes.Add("onclick", "retu
2013-06-14 17:11:23 2134
原创 ScriptManager.RegisterStartupScript()方法在asp.net ajax页面无效的解决方法
ScriptManager.RegisterStartupScript()方法在ajax页面无效的解决方法如果不用Ajax,cs中运行某段js代码方式可以是: Page.ClientScript.RegisterStartupScript(Page.GetType(), "", "window.open('default2.aspx')"); 如果页
2013-06-14 17:10:25 1437
转载 清空GridView数据行
清空GridView中的数据行,总结了两种方法:1.为Gridview 数据源赋空值,这样赋值标题不会保留[html] view plaincopyprint?gridview1.datasource=null 2.为Gridview数据源赋克隆表数据结构,这样会保留标题[html] view plainco
2013-06-03 15:22:35 5453
desta-dw2xls pb dw导出excel
2017-09-12
powerfilter源代码for pb12.5
2017-09-12
silverlight聊天室V1.0源码
2011-06-24
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人