Please check my code to add linkbutton and click event programmatcally in asp.net -
I've written the following code to create a link button programmatically, but it looks like lable at runtime, as Link is not
Like link button = new link button (lnkbutton.id = "hostel club" & amp; 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) < / Code>
The problem is not with your link button for which you need to add event handler to page The link button in the init function .. This will only work ..
Comments
Post a Comment