2011-07-23 63 views

回答

0

設置您的LinkBut​​tons,以便它們具有打開彈出窗口的onclick屬性。

代碼隱藏:

Dim username as String = "foo" 
lnkbtn.Attributes.Add("onClick", "javascript:openWindow(" & username & ");return false;") 
'The "return false" part is important - it stops the LinkButton from doing a postback. 

客戶端:

function openWindow(username) { 
    window.open(my_url + username); //Where my_url is the URL that you want to open. 
} 

username只是那裏的如何通過爲Javascript傳遞值的例子。