随笔分类 -  [01] ASP.NET

ASP.NET用于开发或设计网页/网站。
摘要:this.ddlCities.DataSource = GetAll_List(); this.ddlCities.DataTextField = "Name"; this.ddlCities.DataValueField = "Id"; this.ddlCities.DataBind(); 错误: 'ddlCities' has a SelectedVal... 阅读全文
posted @ 2009-05-14 00:27 emanlee 阅读(1692) 评论(0) 推荐(0) 编辑
摘要:Try to connect to the server via Telnet to verify you can get to the port outside of your application. Try opening up a command prompt, typing "telnet", then in telnet, type the following: o... 阅读全文
posted @ 2009-05-07 22:47 emanlee 阅读(8258) 评论(0) 推荐(0) 编辑
摘要:.NET在后置代码中输入JS提示语句(背景不会变白) Page.ClientScript.RegisterStartupScript(Page.GetType(), "message", ""); 引:http://niunan.javaeye.com/blog/248256 阅读全文
posted @ 2009-04-29 23:22 emanlee 阅读(236) 评论(0) 推荐(0) 编辑
摘要:网页加速的14条优化法则 关键字: 网页加速,Web优化,性能优化,YouMonitor.Us 译自:http://developer.yahoo.com/performance/rules.html 最近,YouMonitor.Us在做Web应用性能优化,在网上发现了文章High Performance Web Sites: The Importance of Front-End Pe... 阅读全文
posted @ 2009-04-29 23:13 emanlee 阅读(364) 评论(0) 推荐(0) 编辑
摘要:There's a couple of exceptions to look out for when you start developing custom ASP.NET Ajax client controls. They are: Microsoft JScript runtime error: Sys.InvalidOperationException: Two components with the same id 'ctl00_MainContentPlaceHolder__eventsRepeater_ctl01_ke1' can't be ad 阅读全文
posted @ 2009-04-02 23:12 emanlee 阅读(3226) 评论(0) 推荐(0) 编辑
摘要:问题描述(Description): When you use the Microsoft Visual Studio 2005 IDE, a lockup condition may occur, and the IDE stops responding (hangs). Additionally, you cannot close the IDE, and you may receive ... 阅读全文
posted @ 2009-03-26 19:10 emanlee 阅读(698) 评论(0) 推荐(0) 编辑
摘要:Enable the Safari Debug menu option on Windows To enable the Safari Debug menu option, you need to find your Preferences.plist file located in %APPDATA%\Apple Computer\Safari (%APPDATA is typically C... 阅读全文
posted @ 2009-03-18 23:29 emanlee 阅读(2821) 评论(0) 推荐(0) 编辑
摘要:项目测试中,客户向我们反应,某个页面请求速度特别慢,简直无法忍受。这里简单插一些情况的描述:对于一个使用人数、并发操作并不多的项目,客户不会过多的在性能上提出要求,对他们来说,多几百ms的等待时间,不会带来更多情绪。 但是,当你请求某个页面后,去泡杯茶回来,发现页面还死死的在那里,进度条不紧不慢的一点一点增长,就无法忍受了。利用Firefox的debug[ debug ?]测了一下,... 阅读全文
posted @ 2009-03-15 23:30 emanlee 阅读(460) 评论(2) 推荐(0) 编辑
摘要:此文只是些肤浅应用和建议(Visual Studio 2003, ASP.NET 1.1) 关于数据处理相关的优化 一、 SqlDataReader和Dataset的选择 Sqldatareader优点:读取数据非常快。如果对返回的数据不需做大量处理的情况下,建议使用SqlDataReader,其性能要比dataset好很多。缺点:直到数据读完才可close掉与数据库的连接(SqlDataRea... 阅读全文
posted @ 2009-03-15 23:28 emanlee 阅读(259) 评论(0) 推荐(0) 编辑
摘要:数据库访问性能优化 数据库的连接和关闭 访问数据库资源需要创建连接、打开连接和关闭连接几个操作。这些过程需要多次与数据库交换信息以通过身份验证,比较耗费服务器资源。 ASP.NET中提供了连接池(Connection Pool)改善打开和关闭数据库对性能的影响。系统将用户的数据库连接放在连接池中,需要时取出,关闭时收回连接,等待下一次的连接请求。连接池的大小是有限的,... 阅读全文
posted @ 2009-03-15 23:24 emanlee 阅读(297) 评论(0) 推荐(0) 编辑
摘要:一、返回多个数据集 检查你的访问数据库的代码,看是否存在着要返回多次的请求。每次往返降低了你的应用程序的每秒能够响应请求的次数。通过在单个数据库请求中返回多个结果集,可以减少与数据库通信的时间,使你的系统具有扩展性,也可以减少数据库服务器响应请求的工作量。 如果你是用动态的SQL语句来返回多个数据集,那我建议你用存储过程来替代动态的SQL语句。是否把业务逻辑写到存储过程中,这个有点争议... 阅读全文
posted @ 2009-03-15 23:19 emanlee 阅读(277) 评论(0) 推荐(0) 编辑
摘要:当页面里有多个用户控件时的执行过程。UserControl1.ascx和UserControl2.ascx为先后在Test.aspx中创建的用户控件: 当Init激发时,控件都已经可用,但控件未通过ViewState对象初始化。 在所有控件都通过ViewState对象初始化之后,激发Loadfrom: http://www.dedecms.com/web-art/ASP_VbScrip... 阅读全文
posted @ 2009-03-15 23:15 emanlee 阅读(371) 评论(0) 推荐(0) 编辑
摘要:作者: 陶刚 在编写ASP.NET应用程序的时候,你会花费多长的时间来考虑性能的问题?很不幸,大多数开发者都对性能问题感到很后悔。性能的规划和设计真的需要放在前面和中心位置。你需要考虑自己的目标,并且确保把良好的性能作为目标之一;接着你需要评估自己的程序,评估的方面越多,改善性能的机会就越大。 在本文中我将解释微软Visual Studio企业版中包含的一个重要工具:微软Applicati... 阅读全文
posted @ 2009-03-15 23:08 emanlee 阅读(1921) 评论(0) 推荐(0) 编辑
摘要:Copy this script into your JavaScript files. It works immediately, and you can query three properties of the BrowserDetect object: Browser name: BrowserDetect.browser Browser version: BrowserDetect.v... 阅读全文
posted @ 2009-03-14 23:42 emanlee 阅读(283) 评论(0) 推荐(0) 编辑
摘要:js函数绑定到asp.net的控件上: 用 控件.Attributes.Add(事件,函数) 。 在 asp.net 中访问 html 控件: 一气之下,把所有控件都换成了 html 的,然后在控件上加上 runat=server 这样在 asp.net 中就可以引用了。用 (FindControl(控件id) as html控件类型).属性,如 (this.FindC... 阅读全文
posted @ 2009-03-14 18:04 emanlee 阅读(576) 评论(0) 推荐(0) 编辑
摘要:In 2005 when Google implemented Google Suggest, Ajax took off. Every web developer was trying to duplicate what Google accomplished. Its now 2008 and there are tons of ways to accomplish Google Suggest. Below is a list of 10 Auto Complete Scripts with various frameworks. The list below is in no part 阅读全文
posted @ 2009-03-14 00:20 emanlee 阅读(623) 评论(0) 推荐(0) 编辑
摘要:GridView当数据源为空时如何实现显示表头 问题:asp.net 2.0 中引入的GridView控件当其数据源为空时(GridView.DataSource=null)不能显示出表头.解决:方法一:采用其EmptyTemplate来实现,模版中写一个静态的table;缺点: 麻烦,每个GridVIew都需要设置一下.方法二: 若数据源为DataTable,则当无数据时,始终返回一个空行的... 阅读全文
posted @ 2009-03-13 23:00 emanlee 阅读(1914) 评论(0) 推荐(0) 编辑
摘要:一些前端开发 IE 中的常用调试工具: Microsoft Script Debugger —— Companion.JS need to install this Companion.JS —— Javascript debugger for IE , like Console API feature IE Developer Toolbar —— Like Firebug (DOM/CSS ... 阅读全文
posted @ 2009-03-12 22:37 emanlee 阅读(3387) 评论(0) 推荐(0) 编辑
摘要:当点击“编辑”按钮以后,可以看到“更新”和“取消”按钮,“取消”按钮可以正常触发RowCancelingEdit事件,但是“更新”按钮不能触发RowUpdating事件。 解决方案: 在中添加 CausesValidation="false" 。 Gridview RowUpdating Not Firing (RowUpdating event not firing on update bu... 阅读全文
posted @ 2009-03-02 22:57 emanlee 阅读(3544) 评论(2) 推荐(0) 编辑
摘要:Best Practices for Speeding Up Your Web Site FROM: http://developer.yahoo.com/performance/rules.html Minimize HTTP Requests tag: content 80% of the end-user response time is spent on the front-end. Mo... 阅读全文
posted @ 2008-12-20 18:59 emanlee 阅读(1369) 评论(3) 推荐(0) 编辑