Answered by:
How to put event handler in dynamic button in asp.net

Question
-
Hi guys
I have a question when i make a dynamic button in asp.net i also add handler in every button that create but some how the button wont fire the code behind when the button is click can someone help me with this.
ArraySize = 7
For i = GetArraySize To ArraySize
MyButton(i) = New Button
With MyButton(i)
.Text = "Edit"
.ID = ds.Tables(0).Rows(i)("ClaimID").ToString
.Attributes.Add("runat", "server")
AddHandler .Click, New EventHandler(AddressOf EditEvent)
ii = i + 1
End WithDescriptionRow1.Controls.Add(MyButton(i))
Next
- Moved by Dave PatrickMVP Monday, April 25, 2016 6:36 PM
Monday, April 25, 2016 5:02 PM
Answers
-
They'll help you over here in Microsoft official ASP.Net forum.
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows Server]
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.- Proposed as answer by Mike Laughlin Monday, April 25, 2016 8:04 PM
- Marked as answer by Just Karl Wednesday, May 4, 2016 8:53 PM
Monday, April 25, 2016 6:36 PM
All replies
-
They'll help you over here in Microsoft official ASP.Net forum.
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows Server]
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.- Proposed as answer by Mike Laughlin Monday, April 25, 2016 8:04 PM
- Marked as answer by Just Karl Wednesday, May 4, 2016 8:53 PM
Monday, April 25, 2016 6:36 PM -
Hi
Sorry i didn't know that i was posting wrong forums all the time really sorry about that
thank for the info
Thank You
Johnny
Monday, April 25, 2016 7:32 PM -
Not a problem. You were asking in Off Topic forum.
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows Server]
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.Monday, April 25, 2016 7:34 PM