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

-
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, Moderator Monday, April 25, 2016 6:36 PM
Question
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 KarlModerator Wednesday, May 04, 2016 8:53 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 KarlModerator Wednesday, May 04, 2016 8:53 PM
-
-