Current location: Hot Scripts Forums » Programming Languages » ASP.NET » Dynamic Button - Urgent


Dynamic Button - Urgent

Reply
  #1 (permalink)  
Old 11-07-03, 05:51 AM
kamlesh_nadar kamlesh_nadar is offline
Newbie Coder
 
Join Date: Oct 2003
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Question Dynamic Button - Urgent

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
Reply With Quote
  #2 (permalink)  
Old 11-08-03, 12:26 AM
kamlesh_nadar kamlesh_nadar is offline
Newbie Coder
 
Join Date: Oct 2003
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Hi Friends,

My code was not working as I was creating the control and adding event inside the ispostback block, so on the click of the link button the code was not finding the control it self.

Regards,
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to disable browser's back button after logout shaky ASP 7 08-18-06 07:37 AM
URGENT! Shutdown Server by web URGENT! ironz Script Requests 1 03-07-04 01:29 PM
image submit button problems Pepe PHP 10 12-22-03 08:15 PM
passing values from one form to another -urgent aspuser25 ASP 1 09-19-03 06:41 PM
radio button selection TheLaughingBandit ASP 3 08-31-03 06:22 PM


All times are GMT -5. The time now is 01:14 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.