顯示具有 Umbraco 標籤的文章。 顯示所有文章
顯示具有 Umbraco 標籤的文章。 顯示所有文章

2012年10月16日

Umbraco Debug Mode

<compilation defaultLanguage="c#" debug="false" batch="false" targetFramework="4.0">

=>

<compilation defaultLanguage="c#" debug="true" batch="false" targetFramework="4.0">

2012年8月17日

ASP.NET 在 behind-code註冊 javascript

BasePage.Current.ClientScript.RegisterStartupScript(</pre>
   this.GetType(),
   "resetActiveTab",
   "<script language=\"javascript\" type=\"text/javascript\">
        jQuery(document).ready(function(){;
            alert(\"xxx\")
        }
    );
    </script>"
this.Page.ClientScript.RegisterStartupScript(...);

reference:
 Go to specific tab after refresh

2012年7月24日

Umbraco root element is missing

scripting files

後台在抓元素( ex: Model.keyImage)時
可以用 Model.HasProperty("name") 來測有沒有這個元素存在

Model.keyImage 回傳值為 umbraco.MacroEngines.DynamicXml型態
(Model.keyImage.InnerText)
沒有值的時候為 string, 長度為 0
(Model.keyImage.Length>0)


最快的方法還是直接用 try catch來忽略掉抓不到元素的錯誤訊息
並賦予 bool型態的 flag以 false, 方便後續的程式碼處理

2012年7月10日

Umbraco using NodeFactory

using presentation.nodeFactory;
using umbraco.NodeFactory;

用到 Node型態時,若引用 umbraco.NodeFactory會導致以下錯誤:
型別 'umbraco.interfaces.INode' 是定義在未參考的組件中。您必須加入參考至組件 'interfaces, Version=1.0.4085.20549, Culture=neutral, PublicKeyToken=null'

也會導致無法將該 web service加入服務參考

需要改用 presentation.nodeFactory

2012年7月6日

趨勢 Note #002

這裡的系統是怎麼架的才能有不能在本機端 debug
只能靠寫 log來觀察程式運作的狀況?

搞得這麼不方便是基於什麼鬼考量 
為什麼? 為什麼? 為什麼?

도대체 왜? 왜? 왜?


沒辦法隨意更改程式內容然後即時得到結果
太痛苦了

2012年7月4日

趨勢 Note #001

設定 IIS站台

開啟專案資料夾 ISUR權限

不用專案建置,用發行

佈版:1. dll檔案 2. usercontorls/ascx ashx aspx ... etc