asp.net

asp.net,c#

随笔分类 -  asp.net

The IE 'non-disappearing content' bug
摘要:The bugIn Internet Explorer (IE) 6, 7 and 8 in 'Compatibility View' there is a bug when hiding content within a hidden container element. The content will remain visible, even though its 'display' property is 'none', as can be observed when the container is re-shown again. Tr 阅读全文

posted @ 2012-02-07 10:46 灵魂边缘 阅读(182) 评论(0) 推荐(0)

在javascript中对一个对象数组进行排序
摘要:function sort(photoes) { var temp, j; for (var i = 1; i < photoes.length; i++) { if (compare(photoes[i], photoes[i - 1]) == -1) { temp = photoes[i]; j = i - 1; do { photoes[j + 1] = photoes[j]; j--; } while (j > -1 && compare(temp, photoes[j]) == -1); photoes[j + 1] = temp; } //endif } 阅读全文

posted @ 2011-02-17 17:11 灵魂边缘 阅读(196) 评论(0) 推荐(0)

Devenv /ResetSkipPkgs
摘要:我的vs 2008从安装上就有一个问题:没有web designer。打开一个aspx页面,没有designer视图,只有source视图;并且source视图也和一般文本编辑器一样,没有任何tag标记和辅助编辑功能。重装几次,搞了一个早上还是没有解决。然后试了一下Devenv /ResetSkipPkgs命令,居然就好了......查了一下Devenv /ResetSkipPkgs这个命令参数的说明:Clears all options to skip loading added to VSPackages by users wishing to avoid loading problem 阅读全文

posted @ 2011-02-17 16:55 灵魂边缘 阅读(680) 评论(0) 推荐(0)

Invalid Viewstate error and how to fix it?
摘要:We have been getting some questions regarding viewstate-related errors like “The viewstate is invalid for this page and might be corrupted”This error is usually caused by the asp worker pr... 阅读全文

posted @ 2009-12-30 12:25 灵魂边缘 阅读(247) 评论(0) 推荐(0)

用Javascript取得URL参数(Get URL parameters/query string using Javascript)
摘要:在Asp.net后台代码中要取得URL参数非常简单,用Request.QueryString["paramName"]就可以了。有时候我想在Javascript里面也能得到URL参数,可是查了一下没有在Javascript内置的方法里面找到,于是自己写了个方法:function getQueryString( paramName ){   paramName = paramName .replac... 阅读全文

posted @ 2009-11-27 10:13 灵魂边缘 阅读(1165) 评论(1) 推荐(0)

用JavaScript对表格排序
摘要:1.你真的懂JavaScript里面的Sort方法吗? 2.你知道JavaScript中 localeCompare 方法的函数体吗?3.表格排序 方法 要哪些参数?  JavaScript中的sort方法直接就提供了排序的功能,不需要我们自己写个循环一个个的判断。但其机制仍然是那样的,[代码]输出的结果为 gray,green,red;那如果为整数呢?[代码]如果你认为是 2,7,25 ;那么很... 阅读全文

posted @ 2009-11-10 15:14 灵魂边缘 阅读(633) 评论(1) 推荐(0)

Redirecting to custom 401 page when "Access denied" occures within an ASP.NET application
摘要:IntroductionIf you have an ASP.NET application with authentication mode set to Windows: <authentication mode="Windows"/> <authorization> <deny users="?" /> </authorization>The... 阅读全文

posted @ 2009-10-12 17:32 灵魂边缘 阅读(525) 评论(0) 推荐(0)

ASP.NET 2.0 中配合Master Page 使用CSS
摘要:ASP.NET 2.0 中增加了内建的 MasterPage 的支持,这对我们来说是一个很大的便利。然而经过一段时间的使用,我发现 MasterPage 并不是那么完美:嵌套的 MasterPage 不能支持设计时界面,以及下面要提到的Content Page 中增加 CSS 的问题。通常,在没有 2.0 之前,我们在页面里要增加一个 CSS 引用的语法如下:<linkrel="styles... 阅读全文

posted @ 2009-10-12 17:26 灵魂边缘 阅读(724) 评论(0) 推荐(0)

正则表达式全部符号解释
摘要:字符 描述\ 将下一个字符标记为一个特殊字符、或一个原义字符、或一个 向后引用、或一个八进制转义符。例如,'n' 匹配字符 "n"。'\n' 匹配一个换行符。序列 '\\' 匹配 "\" 而 "\(" 则匹配 "("。^ 匹配输入字符串的开始位置。如果设置了 RegExp 对象的 Multiline 属性,^ 也匹配 '\n' 或 '\r' 之后的位置。$ 匹配输入字符串的结束位置。如果设置了Re... 阅读全文

posted @ 2009-10-12 17:25 灵魂边缘 阅读(207) 评论(0) 推荐(0)

[转]asp.net导出数据到Excel的三种方法
摘要:asp.net导出到Excel也是个老生常谈的问题,在此归纳一下。 第一种是比较常用的方法。是利用控件的RenderControl功能,得到该控件生成的HTML,然后以Excel文件的类型输出到客户端。这种方法生成的其实是个HTML文件,只不过Excel支持HTML格式,所以使用起来似乎和真正的Excel文件没什么两样,但它终究不是Excel格式,它不能当作数据源供其他程序调用。这种实现起来比较简... 阅读全文

posted @ 2009-10-12 17:20 灵魂边缘 阅读(398) 评论(0) 推荐(0)

ASP.NET:创建Linked ValidationSummary, 深入理解ASP.NET的Validation (转)
摘要:一 、实现的效果 我想对于ASP.NET的Validator控件已经熟悉的不能再熟悉了。我们 已经习惯了用Validator控件来验证我们在表单的输入,并通过ValidationSummary来输出我们为Validator控件设置的Error message。不知道大家有没想过进一步改进一下我们的Validation来改善我们的User Experience。比如,在ValidationSumma... 阅读全文

posted @ 2009-10-12 17:18 灵魂边缘 阅读(360) 评论(0) 推荐(0)

Setting the default Button for a TextBox in ASP.NET
摘要:Hitting the enterkey in aTextBox can sometimes haveundesired effects like the wrong submit Button being “clicked“. The method described below allows you to specify a default Button tosubmi... 阅读全文

posted @ 2009-10-12 17:15 灵魂边缘 阅读(239) 评论(0) 推荐(0)

关于弹出模态窗口的缓存问题
摘要:弹出模太窗口时,用<base target="_self">来控制窗体的大小,弹出模态窗口时,会有缓存存在,解决办法: 在<head></head>中加入<meta http-equiv="pragma" content="no-cache"> 阅读全文

posted @ 2009-10-12 10:12 灵魂边缘 阅读(675) 评论(0) 推荐(0)

GridView Tips and Tricks using ASP.NET – Part III
摘要:The GridView control is quiet a handy control and is the most commonly used control when building an ASP.NET site. The more you work with it, the more you realize how powerful it can be while presenti... 阅读全文

posted @ 2009-09-29 16:20 灵魂边缘 阅读(250) 评论(0) 推荐(0)

GridView Tips and Tricks using ASP.NET - Part II
摘要:The GridView control is quiet a handy control and is the most commonly used control when building an ASP.NET site. The more you work with it, the more you realize how powerful it can be while presenti... 阅读全文

posted @ 2009-09-29 16:19 灵魂边缘 阅读(503) 评论(0) 推荐(0)

GridView Tips and Tricks using ASP.NET 2.0 I
摘要:The GridView control is quiet a handy control and is the most commonly used control when building an ASP.NET site. The more you work with it, the more you realize how powerful it can be while presenti... 阅读全文

posted @ 2009-09-29 16:18 灵魂边缘 阅读(238) 评论(0) 推荐(0)