在aspx頁面:<%= %>嵌入JavaScript的IF條件
if (<%= Not Me.ThisVisa.PassportExpirationDate.IsNull %>){
返回錯誤:
微軟JScript運行時錯誤: '真' 是不確定的
我嘗試這樣做:
if ("<%= Me.ThisVisa.PassportExpirationDate.IsNull.ToString %>" != "True"){
..但我得到一個編譯時錯誤:
Error 5 Option Strict On disallows implicit conversions from 'String' to 'Long'
幫助!
如果您查看您的html源代碼,第一個代碼段呈現給瀏覽器的內容是什麼? – 2010-07-29 03:16:47