kamlesh_nadar
11-07-03, 06:51 AM
Hi Friends,
Find below the code that I am using to dynamically populate a Button inside a table. Now I want to write code on the click event of that button, I tried using both the commented lines but in vain -
Dim BttnBuy As New Button
BttnBuy.Text = "Buy"
BttnBuy.ID = "Buy" & i
'BttnBuy.Click = New System.EventHandler(AddressOf kamTest)
'AddHandler BttnBuy.Click, AddressOf kamTest
tcellcoldata1.Controls.Add(BttnBuy)
The code is in Page_Load event and both dosen't invoke any event. Also since I am using VS.NET for developing my ASP.NET pages after typing AddHandler the intelliscence shows me the Objects that can occupy that space but I cannot see my BttnBuy there.
Please Provide some solution.
Thanks in advance
Find below the code that I am using to dynamically populate a Button inside a table. Now I want to write code on the click event of that button, I tried using both the commented lines but in vain -
Dim BttnBuy As New Button
BttnBuy.Text = "Buy"
BttnBuy.ID = "Buy" & i
'BttnBuy.Click = New System.EventHandler(AddressOf kamTest)
'AddHandler BttnBuy.Click, AddressOf kamTest
tcellcoldata1.Controls.Add(BttnBuy)
The code is in Page_Load event and both dosen't invoke any event. Also since I am using VS.NET for developing my ASP.NET pages after typing AddHandler the intelliscence shows me the Objects that can occupy that space but I cannot see my BttnBuy there.
Please Provide some solution.
Thanks in advance