2012-04-06 90 views
0
this code will not pass the query string to default3.aspx on Image Button .. 

我覺得這是我的語法出現錯誤,請幫我理清錯誤。在下面的代碼:此VB.net語法傳遞查詢字符串有什麼問題?

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load 
      ImageButton1.Attributes.Add("onClick", "window.showModalDialog('Default3.aspx?id='" + Label4.Text + ",'','dialogHeight: 400px; dialogWidth: 370px;');return false;") 
     End Sub 

回答

0

修改代碼如下

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load 
     ImageButton1.Attributes.Add("onClick", "window.showModalDialog('Default3.aspx?id=" + Label4.Text + "','','dialogHeight: 400px; dialogWidth: 370px;');return false;"); 
End Sub 

希望這將幫助你...

+0

謝謝@普拉卡什... – 2012-04-06 07:40:48