2009年3月3日 星期二

Callback manually

Usually we use __doPostBack(‘’,’’); for manually do PostBack action in our ASP.NET code, but if you use this function in an AJAX enable page, you won’t get any benefit from UpdatePanel, your UI will still get flash every you call __doPostBack().

Now, try to call __doPostBack() in the other way: setTimeout('__doPostBack(\'\',\'\')', 0);

Use javascript function setTimeout instead call __doPostBack directly then you won’t see any UI flash now. :-)

2008年12月11日 星期四

Can’t use explorer open library in MOSS.

I saw a message when I tried to open a library with Windows Explorer in the MOSS.

2008-12-11_164418

 

The message is…

2008-12-11_164447

 

I found some body talking about it too, but their method not work for me.

even the hot-fix from Microsoft didn’t work for me.

http://www.microsoft.com/downloads/details.aspx?FamilyId=17C36612-632E-4C04-9382-987622ED1D64&displaylang=en

 

Windows 2008 Enterprise, Office 2007, Microsoft Office SharePoint Server 2007, IE7

2008年12月9日 星期二

Predefined XML Schema and Custom Attribute

They are different…

I thought the XML Schema I defined in Envision will auto bind to CustomAttribute, but I am wrong.

They are different thing, they just use same Name Value idea.

When you binding an control’s (ex: WFTextBox) value with XML Schema, don’t think it will write to Custom Attribute as well and vice versa.

I still trying to find a way to write certain Custom Attribute to XML Schema.

You can use XPATH as name of Custom Attribute, then you can access the XML Schema.

ex: api.SetCustomAttr(woid, “/pd:myField/pd:EmployeeName”, “Foo Bar”);

2008年8月6日 星期三

我該用那個 namespace,那個 class?

在 VS 2005 裡,想寫一支 class 繼承自某個已寫好的 base class,但不知道那個 base class 是在那個 namespace 之下怎麼辦?

很簡單,先把包含那個 class 的 assembly 給參考進來。
2008-07-30_121844

接著去把物件瀏覽器這個好用的東西打開…
2008-07-30_121955

然後點開剛剛參考的那個 assembly,就會看到下圖這個樣子,其中紅色的框框是 assembly name,綠色的是 namespace(前面有個大括號圖示),再來藍色的是 class 名稱(前面有個代表類別的圖示)。
2008-07-30_122058

就是這樣,非常的簡單吧!
當沒有明確的文件時,就這麼找,自然就會找到你想要的相關資訊了。