-
Recent Posts
Recent Comments
Mr WordPress on Hello world! zhi on 《Windows用户态程序高效排错》 中涉及到的链接(ZT) Amanda on 歌颂祖国,我们不差钱 Eternal on 歌颂祖国,我们不差钱 Eternal on English Reading:关于中国成为世界第二的真相 Archives
- May 2017
- April 2017
- July 2016
- June 2016
- April 2015
- May 2011
- April 2011
- March 2011
- February 2011
- January 2011
- December 2010
- November 2010
- October 2010
- September 2010
- August 2010
- July 2010
- June 2010
- May 2010
- April 2010
- March 2010
- February 2010
- January 2010
- December 2009
- November 2009
- October 2009
- September 2009
- August 2009
- July 2009
- June 2009
- May 2009
- April 2009
- March 2009
- February 2009
- January 2009
- December 2008
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- August 2005
- July 2005
Categories
Meta
Category Archives: Web Development
jQuery比较两张图片
这个有关日本地震的新闻页做得很不错:日本地震前后卫星图像对比 http://news.ifeng.com/world/special/ribendizhen/duibi.shtml 分析整理一下其实现机制。 整理后的代码分为3个部分:1. CSS 用于设置包含before,after图片的 两个div的样式 <style media=”screen” type=”text/css”> #beforeafter .section { margin-top: 2em; position: relative; } #beforeafter .section p.source { position: absolute; right: 0; top: 0.5em; color: #999; font-size: 7pt; } .beforeafter { position: relative; overflow: hidden; } … Continue reading
Posted in Web Development
Leave a comment
File downloading fails when using SSL
There is a file downloading function as: protected void Button1_Click(object sender, EventArgs e){ string path= @”c:\windows\notepad.exe”; FileInfo fileInfo = new FileInfo(path); if (fileInfo.Exists) { Response.Clear(); Response.ContentType = “application/octet-stream“; Response.AddHeader(“Content-Disposition”, “attachment; filename=” + fileInfo.Name); Response.AddHeader(“Content-Length”, fileInfo.Length.ToString()); Response.WriteFile(fileInfo.FullName); Response.Flush(); } … Continue reading
Posted in Web Development
Leave a comment
笔记: 用powershell进行web测试
Request/Response Testing with Windows PowerShellhttp://msdn.microsoft.com/en-us/magazine/cc507642.aspx 1.用WebClient获取ViewState和EventValidation 2.用WebRequest模拟button click,发送web request. 注意对radio box 和 buttong的模拟 $postData = ‘TextBox1=5&TextBox2=3&Operation=RadioButton1&Button1=clicked’ The fourth name-value pair, Button1=clicked, is somewhat misleading. I need to supply a value for Button1 to simulate that it is being clicked, … Continue reading
Posted in Web Development
Leave a comment
笔记:用jQuery进行UI Testing
Web Application UI Testing with jQueryhttp://msdn.microsoft.com/en-us/magazine/gg490354.aspx使用 JavaScript 实现 Web 应用程序请求-响应测试http://msdn.microsoft.com/zh-cn/magazine/ee335793.aspx 1 . Test harness Test harness是一个UITestHarnes.htm html页面,在页面中使用frameset,左面的fame是包含test逻辑的html页面,右面的fame包含要测试的aspx页面。 2. Test Logic Page 测试页面用jQuery在要测试的页面中获取控件,并检查结果是否正确 function clickCalculate() { var btn1 = $(parent.rightFrame.document).find(‘#Button1’); if (btn1 == null || btn1.val() == undefined) throw “Did … Continue reading
Posted in Web Development
Leave a comment
Fixing the issue “could not load dojox.grid._data.model” when working with dojo 1.5
I think there were lots of people studying dojo with the famous book “Mastering Dojo” and encountering errors as I did. In section “Researching Cigars Using JSONP” of that book , I got following sample code for data grid operation … Continue reading
Posted in Web Development
Leave a comment
How to Fix “Failed to access IIS metabase”
Maybe you will see following error message when you run your asp.net application on a machine on which you installed .NET Framework before IIS:”System.Web.Hosting.HostingEnvironmentException: Failed to access IIS metabase. The process account used to run ASP.NET must have read access … Continue reading
Posted in Web Development
Leave a comment
Debug Silverlight with Firefox
http://timheuer.com/blog/archive/2010/08/16/enable-silverlight-debugging-in-firefox-visual-studio.aspx Here’s how to ensure the VS debugger attaches to the Silverlight app for debugging: In Firefox address bar type about:config Read the warning, choose your preference to always remind you or not and accept In the search bar of … Continue reading
Posted in Web Development
Leave a comment
Bing Map Silverlight 实践
Bing Maps地图引擎开放了Silverlight和Ajax两种客户端API,ASP.NET MVC的著名例程NerdDinner(http://www.nerddinner.com/)中就用到了Bing Maps的Ajax版,MS还推出了Bing Maps的Silverlight控件。见Getting Started Using the Silverlight Map Control(http://msdn.microsoft.com/en-us/library/ee681890.aspx)。以下是我对Bing Maps的Silverlight开发的一些尝试和笔记。 准备活动:1. 下载Bing Maps Silverlight控件http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=beb29d27-6f0c-494f-b028-1e0e3187e830 2. 安装Bing Maps Silverlight控件,到https://www.bingmapsportal.com生成Bing Maps帐号以及开发要用到的Bing Maps Key。一个MSN帐号最多可以申请5个Key。详情见Bing Maps Silverlight Control SDK 帮助文件中“Accessing the Control Using a Bing Maps Key”一节。 3. 生成Silverlight Application工程,引用C:\Program Files\Bing Maps … Continue reading
Posted in Web Development
Leave a comment
Function fadeOut in jquery-1.4.1-vsdoc.js does not work in Firefox 3.6.6
In jquery.1.4.1.js, function fadeOut comes with following code: // Generate shortcuts for custom animationsjQuery.each({ slideDown: genFx("show", 1), slideUp: genFx("hide", 1), slideToggle: genFx("toggle", 1), fadeIn: { opacity: "show" }, fadeOut: { opacity: "hide" }}, function( name, props ) { jQuery.fn[ name … Continue reading
Posted in Web Development
Leave a comment
Sliverlight 3.0 程序的AG_E_PARSER_UNKNOWN_TYPE异常
把一个Sliverlight2.0程序升级成到3.0,运行时出现AG_E_PARSER_UNKNOWN_TYPE异常。程序崩溃在某个页面的InitializeComponent()方法中的System.Windows.Application.LoadComponent(this, new Uri(<XXX.xaml>) 原因:该页面用到了StaticResource binding,VS自动生成的resource class的构造函数为internal,需要把它改成public。
Posted in Web Development
Leave a comment