0
如何設置以下動態創建的HTML以重定向到mypage.aspx
?HTML中的Response.Redirect
Dim s As String = " <div style=""float: left; width: 716px; height: 25px; "">"
s += " <button type=""button"" id=""btnRedirect"" style=""float: right; width: 100px; font-size:12px;"" >Redirect</button>"
s += " </div>"
ScriptManager.RegisterStartupScript(Me.Page, Me.GetType(), "temp1", "<script type='text/javascript'> $('" + s + "').dialog({width: 750, height: 400,resizable: false});</script>", False)
您好,感謝您的答覆。 btnRedirect在document.ready中不可用,只有當用戶按下特定的按鈕後纔會觸發代碼 - 然後彈出div(其上有按鈕) - 因此click功能當前不會觸發。鏈接按鈕可能會更好嗎? –
我已經用on綁定替換了點擊綁定。看到我更新的答案。 –