[email]jopconsignit.se[/email] (Jonas) wrote in news:8f2b216b.0308270753.299e9a83
Look at the IPostBackEventHandler interface. This interface allows you> The question: How shall I write the Click event for the
> "delete-button" so that my aspx-page renders with one less user
> Control on PostBack?
> Because the user controls are programmatically loaded I have to load
> them at every post Back, In what event should I do that?
to process postback data BEFORE loading of the controls occurs.
Here's some code:
Public Class TestButton
Dim sText As String
Public Overloads Sub RaisePostBackEvent(ByVal eventArgument As
String) Implements IPostBackEventHandler.RaisePostBackEvent
If eventArgument = "OK" Then
sText = "Event Argument OK"
sText = "No Argument"
Protected Overrides Sub CreateChildControls()
Dim hlLink As HyperLink = New HyperLink()
hlLink.ID = Me.UniqueID
hlLink.Text = "ExecuteLink " & sText
hlLink.NavigateUrl = Page.GetPostBackClientHyperlink(hlLink,
Lucas Tam (REMOVEnntprogers.com)
Please delete "REMOVE" from the e-mail address when replying.