1
我寫了下面的代碼以編程方式創建一個LinkButton,但它的表現就像在運行時拉布勒沒有鏈接請檢查我的代碼添加的LinkButton和點擊事件programmatcally在asp.net
Dim lnkbutton As LinkButton = New LinkButton()
lnkbutton.ID = "HostelsClub" & dr("dshotelid").ToString()
lnkbutton.Text = "HostelsClub"
lnkbutton.PostBackUrl = Request.Url.ToString()
lnkbutton.ToolTip = "Click here To Book"
AddHandler lnkbutton.Click, AddressOf lnkBook_Click
PHbook.Controls.Add(lnkbutton)
'Request.Url'看起來像什麼?什麼是鏈接按鈕的html源代碼,當你做一個「查看源代碼」? – shahkalpesh 2010-02-03 07:50:46
它沒有出現在它 – 2010-02-03 07:56:51
任何一項PostBackUrl看起來像這樣: HostelsClub – 2010-02-03 08:00:12