Patrick's File Collection

Just do what I like!!
posts - 6, comments - 27, trackbacks - 0, articles - 1
  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理

2007年3月20日

1359XXX-NAI
登录地址
https://secure.nai.com/apps/downloads/my_products/login.asp

XXX换为任意数字均可登录,不过对应不同的产品组合
1359001-NAI里面有几乎全部企业版产品
1359125-NAI里面有McAfee Desktop Firewall 8.5

posted @ 2007-03-20 22:13 Patrick Zhang| 编辑

2007年2月13日

ASP.NET AJAX正式版发布了,下了一个,装好。拿出以前一个基于Atlas版本的web程序,修改了一番,运行。发现Treeview 功能异常,表现如下:

点击Sager目录节点,展开自节点没问题

点击10xxz子节点,没有展开此节点,却返回到根节点

在网上查了一下,一般都说Updatepanel 不支持TreeView 控件。

突然想到可能和TreeView控件的一个属性有关

EnableClintScript

此属性可指定 TreeView 控件是否在兼容的浏览器上呈现客户端脚本以处理展开和折叠事件。当此属性设置为 true 时,兼容的浏览器执行代码以展开和折叠客户端上的节点。属性设置为 false 时,需要向服务器进行发送才能展开和折叠节点

省缺时改值为true

原来是Treeview控件自己的ajax与ASP.NET AJAX一起作用了。

将EnableClintScript属性设置为 false。再运行程序,目录节点子节点展开正常。

posted @ 2007-02-13 16:11 Patrick Zhang 阅读(3269) | 评论 (11)编辑

刚刚装了live writer 发个贴测试一下

posted @ 2007-02-13 13:44 Patrick Zhang 阅读(69) | 评论 (0)编辑

2006年11月15日

今天用vs2005 做一个web 程序时发现当试图更改控件ID时,总是出现"The Directory Name is Invaild" 错误提示。

以前曾遇到一次,忘了如何解决了。于是上网搜了搜发现在codeproject上一个老外也遇到同样问题,这是他的解决方法。
http://www.codeproject.com/useritems/VsPropRenameBug.asp

Workaround

1. Navigate to the directory
..\Documents and Settings\<%UserName%>\Local Settings\Application Data\Microsoft\WebsiteCache

2. Create a folder with the same name as the name of your project

看到WebsiteCache ,突然想起上次如何解决这个问题。

1. 按上面路径找到WebsiteCache 目录
2. 打开Websites.xml文件,内容类似如下:

<?xml version="1.0" encoding="utf-16"?>
<DesignTimeData>
  
<Website RootUrl="http://Localhost/net2005test1/" CacheFolder="net2005test1" startpage="Default.aspx" addnewitemlang="Visual C#" addnewitemoptions="2" startaction="1" _LastAccess="10/18/2006 9:02:49 AM"/>
  
<Website RootUrl="http://Localhost/CssAdaptersTutorial/" CacheFolder="CssAdaptersTutorial" addnewitemlang="Visual C#" _LastAccess="11/1/2006 2:04:34 PM"/>
 
</DesignTimeData>
3.删除有问题的website标记段
4.重新打开web程序在vs2005, 控件id可以更改,问题解决。

写道这里突然想到应到微软bug report查查, 果然是bug。会在vs下一版本或service pack里解决。
避免错误的方法就是不要同时用vs2005打开多个web程序,否则他们的cache 就晕了


http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=101992

This problem should only occur if you have multiple instances of the Visual Studio IDE open at the same time and then close one. You can avoid this problem by only having one instance open at a time.

A fix has been created for this bug. The fix will be in the next version of Visual Studio or possibly in a service pack. If this bug is significantly impacting your development you should contact Microsoft Product Support to request a hot fix.

Microsoft Web Development Tools Team

Posted by Microsoft on 2/15/2006 at 2:30 PM
Clarification for user comments:

The underlying problem is that if the WebSiteCache directory for a specific web site is deleted this problem will occur. Once the directory is deleted it will continue to occur even if you reboot the machine.

There is a bug in Visual studio that when you have more than one instance of the IDE open and close a web-site it will delete the WebSiteCache directory of other web-sites. This is the common way to get into this situation. However, you could also get into the situation by deleting the directory manually (per the repro steps of this bug report.)

The quick fix is to make VS re-build the web site cache:
a) shut down all instances of VS
b) remove cache from command prompt> rd /s /q "%userprofile%\Local Settings\Application Data\Microsoft\WebsiteCache"
c) re-open your web site and the cache will be re-created

An alternative method to fix the one web site without deleteing the entire cache is the following:
a) shut down all instances of VS
b) open "%userprofile%\Local Settings\Application Data\Microsoft\WebsiteCache\websites.xml"
c) locate the entry for your web site and get its CacheFolder name. Usually the name of the web.
d) Ensure a sub-directory of that name exists under "%userprofile%\Local Settings\Application Data\Microsoft\WebsiteCache\"

posted @ 2006-11-15 15:42 Patrick Zhang 阅读(2060) | 评论 (0)编辑

2006年11月2日

just by using the core ASP.NET Ajax extentions beta 1
(this example is taken from the ASP.NET Ajax documentation on page http://ajax.asp.net/docs/ClientReference/Sys.WebForms/PageRequestManagerClass.aspx)

Assuming you have a scriptmanager on your page, an updatepanel and an html DIV-element (named 'myUpdatePanel' with style='visibility:hidden;').  'myUpdatePanel' contains the text/image you want to show when the UpdatePanel is waiting to update itself.

<script type="text/javascript" language="javascript">
 
Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(BeginRequestHandler);
  Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler)

 
function BeginRequestHandler(sender, args)
  {
    ActivateAlertDiv(
'visible', 'myUpdatePanel');
  }

  function EndRequestHandler(sender, args)
  {
    ActivateAlertDiv(
'hidden', 'myUpdatePanel');
  }

  function ActivateAlertDiv(visstring, elem)
  {
   
var adiv = $get(elem);
   
adiv.style.visibility = visstring;
  }
</script>

 

 

posted @ 2006-11-02 10:26 Patrick Zhang 阅读(262) | 评论 (0)编辑

这两天在测试程序在IE7的兼容性,发现原来在IE6显示正常的布局,在IE7下完全乱了。
前一阵用IE7 测试版还显示正常。
通过跟踪javascript,发现
document.body.offsetHeight
根本取不到值,又试了clientHeight也取不到值。

不知道是IE7正式版的bug, 还是有其他新的方法,不再支持这些属性。

那位朋友知道,提示一下。

谢谢

将页面的doctype从
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
换成
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
可以取道offsetHeight 值

我的程序用vs2005开发
页面上的控件尺寸,字大小就全乱了,得从新调整

posted @ 2006-11-02 08:48 Patrick Zhang 阅读(3990) | 评论 (16)编辑