DesignerVerbCollection in a page

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top