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

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -