X
[XtOf].fr
Hello World !
Without answers in my country (FRANCE), I hope that you'll have a response
to my problem !
I'm trying to create a composite control (WebControlLibrary) with VS.NET
ARCHITECT 2003 (FR).
Concerning the personalized properties, redrawing in the User Interface and
on the Web, there's no problems...
But I do not manage to recover one event created dynamically in the
CreateChildControl function !
The following example contains only the basic code for a composite
controls...
----
Protected Overrides Sub Render(ByVal output As
System.Web.UI.HtmlTextWriter)
EnsureChildControls()
MyBase.Render(output)
End Sub
Protected Overrides Sub CreateChildControls()
Dim btnTest As New
System.Web.UI.WebControls.Button
btnTest.ID = "btnTest"
btnTest.Text = "Cliquez ici pour voir !"
Controls.Add(btnTest)
AddHandler btnTest.Click, AddressOf test_click
End Sub
Protected Sub test_click(ByVal source As Object,
ByVal e As EventArgs)
DirectCast(FindControl("btnTest"),
System.Web.UI.WebControls.Button).Text = "Bravo !"
End Sub
---
When one clicks on the button, my code is executed and the button is well
redrawed (something like userscontrols) but the function test_click is never
called !!!!
I made the test on Windows 2000 professionnal (FR) and Windows XP Pro (FR).
I also made the test with CSharp... and : NOTHING!
It's also the same if you use a label, a linkbutton or I do not know what
anything else !
On the other hand, I did not test any other method than 'Code Behind'.
Moreover, the example of chapter 11 - vbcompositesnippet- of the french
version of book 'Creating Web applications...' (Microsoft Press France)
preparing with examination MCSD.NET does not function either...
Is it a Microsoft .NET Developpers's Team known bug ?
If so, is there a service pack available?
Thanks you for your help...
Regards,
[ XtOf ]
Without answers in my country (FRANCE), I hope that you'll have a response
to my problem !
I'm trying to create a composite control (WebControlLibrary) with VS.NET
ARCHITECT 2003 (FR).
Concerning the personalized properties, redrawing in the User Interface and
on the Web, there's no problems...
But I do not manage to recover one event created dynamically in the
CreateChildControl function !
The following example contains only the basic code for a composite
controls...
----
Protected Overrides Sub Render(ByVal output As
System.Web.UI.HtmlTextWriter)
EnsureChildControls()
MyBase.Render(output)
End Sub
Protected Overrides Sub CreateChildControls()
Dim btnTest As New
System.Web.UI.WebControls.Button
btnTest.ID = "btnTest"
btnTest.Text = "Cliquez ici pour voir !"
Controls.Add(btnTest)
AddHandler btnTest.Click, AddressOf test_click
End Sub
Protected Sub test_click(ByVal source As Object,
ByVal e As EventArgs)
DirectCast(FindControl("btnTest"),
System.Web.UI.WebControls.Button).Text = "Bravo !"
End Sub
---
When one clicks on the button, my code is executed and the button is well
redrawed (something like userscontrols) but the function test_click is never
called !!!!
I made the test on Windows 2000 professionnal (FR) and Windows XP Pro (FR).
I also made the test with CSharp... and : NOTHING!
It's also the same if you use a label, a linkbutton or I do not know what
anything else !
On the other hand, I did not test any other method than 'Code Behind'.
Moreover, the example of chapter 11 - vbcompositesnippet- of the french
version of book 'Creating Web applications...' (Microsoft Press France)
preparing with examination MCSD.NET does not function either...
Is it a Microsoft .NET Developpers's Team known bug ?
If so, is there a service pack available?
Thanks you for your help...
Regards,
[ XtOf ]