D
David
Hi
I have created a class that inherits from Page. I have no problem and
its work well. Now, I'd like to append a new link in the properties
section that opens a form to configure some custom parameters.
I declare the page class with:
<Designer(GetType(DesignerForm))> _
Public Class MyWebForm
Inherits System.Web.UI.Page
and the DesignerForm class:
Imports System.ComponentModel.Design
Imports System.Web.UI.Design
Public Class DesignerForm
Inherits System.Web.UI.Design.ControlDesigner
Private options As DesignerVerbCollection
Private control As MyWebForm
Private Sub OtherProperties(ByVal sender As Object, ByVal e As
EventArgs)
'I open my form with the parameters configuration here
MsgBox("Test")
End Sub
Public Overrides ReadOnly Property Verbs() As DesignerVerbCollection
Get
options = New DesignerVerbCollection
options.Add(New DesignerVerb("Other properties", New
EventHandler(AddressOf OtherProperties)))
options.Item(0).Checked = False
options.Item(0).Enabled = True
options.Item(0).Visible = True
options.Item(0).Supported = True
Return options
End Get
End Property
End Class
I have tried this with a normal component and works, but not in a
page.
Is possible to do this?
Thanks a lot
David
I have created a class that inherits from Page. I have no problem and
its work well. Now, I'd like to append a new link in the properties
section that opens a form to configure some custom parameters.
I declare the page class with:
<Designer(GetType(DesignerForm))> _
Public Class MyWebForm
Inherits System.Web.UI.Page
and the DesignerForm class:
Imports System.ComponentModel.Design
Imports System.Web.UI.Design
Public Class DesignerForm
Inherits System.Web.UI.Design.ControlDesigner
Private options As DesignerVerbCollection
Private control As MyWebForm
Private Sub OtherProperties(ByVal sender As Object, ByVal e As
EventArgs)
'I open my form with the parameters configuration here
MsgBox("Test")
End Sub
Public Overrides ReadOnly Property Verbs() As DesignerVerbCollection
Get
options = New DesignerVerbCollection
options.Add(New DesignerVerb("Other properties", New
EventHandler(AddressOf OtherProperties)))
options.Item(0).Checked = False
options.Item(0).Enabled = True
options.Item(0).Visible = True
options.Item(0).Supported = True
Return options
End Get
End Property
End Class
I have tried this with a normal component and works, but not in a
page.
Is possible to do this?
Thanks a lot
David