Loading

随笔分类 -  asp.net 2.0

摘要:因隐藏字段不支持focus()方法,故需排除掉 Code Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 阅读全文
posted @ 2008-11-22 11:54 .net's 阅读(397) 评论(0) 推荐(0)
摘要:Introduction: The article "ASP.Net 2.0: Export GridView to Excel" received a very good response from our user community. Some of the excellent tips collected from the user feedback have been included... 阅读全文
posted @ 2008-11-22 10:01 .net's 阅读(531) 评论(0) 推荐(0)
摘要:Introduction: In this article, we will see how to Export an ASP.Net 2.0 GridView to Excel. The focus of the article is the Export to Excel functionality - the Gridview and it's data binding are only... 阅读全文
posted @ 2008-11-21 22:18 .net's 阅读(1019) 评论(0) 推荐(0)
摘要:对于1个单引号,则转义该单引号 对于1个反斜杠跟1个单引号,则不管它。 对于2个及以上的反斜杠加一个单引号,则分别对每个反斜杠和单引号都进行转义,即 使反斜杠数目保持不变, 并转义单引号。 Code Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->... 阅读全文
posted @ 2008-11-19 21:43 .net's 阅读(1544) 评论(0) 推荐(0)
摘要:GridView export to excel 格式参考 Code Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->mso-number-format:"0" NO Decimals mso-number-format:"0\.000" 3 D... 阅读全文
posted @ 2008-11-19 15:32 .net's 阅读(2521) 评论(3) 推荐(0)
摘要:Code Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->private void GridViewToExcel() { HttpContext.Current.Response.Clear(); HttpCo... 阅读全文
posted @ 2008-11-18 20:31 .net's 阅读(411) 评论(0) 推荐(0)
摘要:Code Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->/* * 将回车换行分开比较好 * update date:2009-01-01 * */ /// /// 回车 /// ... 阅读全文
posted @ 2008-11-16 14:57 .net's 阅读(876) 评论(3) 推荐(0)
摘要:有些命令是在调试下才可用,有些则在编写程序时可用。 用alias可以列出所有命令 >alias Visual Studio 命令和开关 Visual Studio 命令允许从键盘与集成开发环境 (IDE) 直接进行交互。IDE 内的许多对话框、窗口和菜单命令都有命令行等效项,可以将其键入“命令”窗口、即时窗口或“查找/命令”框中,以显示一个对话框或执行一个命令。 Visual Stu... 阅读全文
posted @ 2008-11-14 23:44 .net's 阅读(1108) 评论(0) 推荐(0)
摘要:在调试时,即时窗口(Immediate Window)非常有用。 在调试时,调出即时窗口 visual studio 2005 :Ctrl+Alt+I 或则 Ctr+D,I visual studio 2008 : Ctrl+Alt+I visual studio 2003 : Ctrl+Alt+I 阅读全文
posted @ 2008-11-14 23:21 .net's 阅读(1977) 评论(0) 推荐(0)
摘要:在asp.net页面中,当有验证控件,而且想在验证控件验证通过之后, 在弹出一个确认对话框,提示是否继续。 当在button按钮上添加客户端的onclick="return confirm('Are you sure to continue?')"时,验证控件的验证就会失效。 因为验证控件也是添加客户端的onclick事件。 ------------------------------------... 阅读全文
posted @ 2008-11-14 21:12 .net's 阅读(978) 评论(0) 推荐(0)
摘要:在使用 CustomValidator 控件时,必须在任何服务器端处理期间检查 System.Web.UI.Page.IsValid 属性以确定是否通过了所有验证检查。IsValid 属性返回该页上所有验证程序控件的累积状态。此属性用于确保任何服务器端处理都已通过所有验证检查。 Code Code highlighting produced by Actipro CodeHighlighter... 阅读全文
posted @ 2008-11-09 09:48 .net's 阅读(529) 评论(0) 推荐(0)
摘要:1,让ie允许调试脚本,具体步骤如下: 打开ie->工具菜单->inter选项->高级选项卡->去掉“禁止脚本调试"选项 2,在javascript脚本中设置断点,F5运行程序,将自动运行到断点处暂停 第2种直接在html页面也可以调试,在javascript代码中加上一句debugger; Code Code highlighting produced by Actipro ... 阅读全文
posted @ 2008-11-07 23:26 .net's 阅读(707) 评论(0) 推荐(0)
摘要:使用 ECMAScript (JavaScript、JScript) 创建验证函数。 下面的代码示例解释了自定义客户端验证。源自页的摘要将显示由 CustomValidator 控件引用的 TextBox 控件。验证控件调用名为 validateLength 的客户端脚本函数,以确认用户在 TextBox 控件中输入了至少 8 个字符。 Visual Basic 复制代码 ... 阅读全文
posted @ 2008-10-22 22:49 .net's 阅读(530) 评论(0) 推荐(0)
摘要:CodeCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> // 1 //DropDownList1.SelectedValue = "5g"; // 若SelectedValue没有对应的5g,则抛出如下异常 ... 阅读全文
posted @ 2008-10-18 20:47 .net's 阅读(555) 评论(1) 推荐(0)
摘要:A Complete URL Rewriting Solution for ASP.NET 2.0 from:http://www.simple-talk.com/dotnet/asp.net/a-complete-url-rewriting-solution-for-asp.net-2.0/ 阅读全文
posted @ 2008-09-09 14:38 .net's 阅读(826) 评论(0) 推荐(0)
摘要:ASP.NET 状态管理 阅读全文
posted @ 2008-09-08 14:21 .net's 阅读(427) 评论(0) 推荐(0)
摘要:HtmlTextWriter类暴露(expose)一个方法来呈现如下每一部分: 1,RenderBeginTag:呈现或产生HTML元素的开启标签 2,AddAttribute:该方法每次被调用时,为每种属性在HTML元素的开启标签中形成或呈现属性, 该方法必须在RenderBeginTag之前调用。 3,AddStyleAttribute:该方法每次被调用时,为每种样式属性作为HTML元素的一部... 阅读全文
posted @ 2008-08-21 11:57 .net's 阅读(514) 评论(0) 推荐(0)
摘要:可以使用Label控件来标注一个HTML表单字段。Label控件拥有属性AssociatedControlID,可以设置此属性来指向表示表单字段的ASP.NET控件。 例如,代码清单2-3中的页面含有一个简单的表单,表单包含两个字段用于输入名和姓。Label控件用于标注这两个TextBox控件。 Code Code highlighting produced by Actipro CodeHi... 阅读全文
posted @ 2008-08-19 10:37 .net's 阅读(2688) 评论(1) 推荐(1)
摘要:We can use the SiteMapPath control simply by declaring the control in a page. The control automatically uses the Web.sitemap file located in the root of your application. Typically, you do not add ... 阅读全文
posted @ 2008-08-16 11:09 .net's 阅读(508) 评论(0) 推荐(0)