最佳解答者
几个小问题

問題
-
1: 我在gridview上的hyperlinkfield每次點擊完變成了灰色, 以後每次打開顏色都變不回來了, 請問應該怎樣設置.
2: 我希望在這個script: Me.ClientScript.RegisterStartupScript(Me.GetType(), "alert", "alert('This case has already been closed')", True) 運行完畢並且顯示出message後, 可以指向於另外一個webpage, 我試過把response.redirect(“home.aspx”)放在這個script的後面, 但是這樣的話系統就直接跳到home.aspx上, 並不執行那段script. 另外我想要的效果是不單可以指向那home.aspx, 同時還可以refresh他, 請問有什麼方法嗎?
解答
所有回覆
-
請問大大在alert()後面跟window.location.href=’home.aspx’的後面指的是什麼? 是在RegisterStartupScript後面嗎?
Me.ClientScript.RegisterStartupScript(Me.GetType(), "alert", "alert('This case has already been closed')", True)
Response.Write("<script language=javascript>window.location.href='home.aspx'</script>")
這樣的結果就是直接跳回home.aspx而不顯示上面的alert.
還有就是我refresh的時候頁面不能清空, 請問在哪里控制, thanks alot