Thanks for you reply
I've used the code you've send me. It did not work. I made my control a lot
simpeler and the result was the same.
It looked as if the button click event were not handled by te procedure of
the addresoff statement:
The code looks now like: (And I'm sure that the createchildcontrols is
called instaed of the the buttonclick procedure)
Protected Overrides Sub CreateChildControls()
If Me.Page.IsPostBack Then ' this is what runs after the button click
''Exit Sub '' (if I use Exit sub, no control is displayed)
End If
But = New Button
But.Text = "Submit"
But.ID = ClientID & "X"
Controls.Add(But)
AddHandler But.Click, AddressOf Me.ButtonClick
ChildControlsCreated = True
end Sub
Private Sub ButtonClick(ByVal sender As Object, ByVal e As System.EventArgs)
But = FindControl(ClientID & "X")
But.Text = "xxxx"
Controls.Add(But)
End Sub
I've dimensioned the button But as a private control, did not help
íve done this with the withevents keyword, no difference
and i've dimensioned them in the procedures createchildrecords and
buttonclick
no differences
Ton
"Alessandro Zifiglio" <alessandrozifiglio@NO-SPAM-hotmail.com> schreef in
bericht news:zTbSb.1276$HO2.977@news.edisontel.com...
[quoted text, click to view] > hyperlink control does not postback. Use a linkbutton control instead.
>
> As an alternative you can always define an anchor element and have it
raise
> a postback event but then the end product is a link button
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconpostbackusingjavascriptsample.asp
>
> so in short, if you are building a composite control use a linkbutton
> control ;P
>
> "ton" <vrs@home.nl> wrote in message
> news:bv8uhc$n2m$1@news1.tilbu1.nb.home.nl...
> > Hi,
> > I wrote a customserver control with 2 columns showing the data from 1
> > record.
> > i use label & hyperlink as for the field name and text and checkboxes
for
> > the other data.
> >
> > I want to use the hyperlink. How can I get a postback on that hyperlink.
> >
> > Ton
> >
> >
>
>