Implementing IPostBackDataHandler in a custom web control with VB.NET

A

Andrew Dawson

I have created a custom class with Visual Basic that inherits from the
drop down list web control. In order to update the value properly, I
have tried to implement IPostBackDataHandler, but receive the
following error message:

Interface 'System.Web.UI.IPostBackDataHandler' is already implemented
by base class 'System.Web.UI.WebControls.DropDownList'.

My code is as follows:

Imports System.Web.UI

Public Class CodeDescDropDown
Inherits System.Web.UI.WebControls.DropDownList
Implements INamingContainer
Implements IPostBackDataHandler

Protected Overrides Sub Render(ByVal output as
System.Web.UI.HtmlTextWriter)
Mybase.Render(output)
End Sub

'Class implementation

End Class

For some reason, this error is not created if I use C# to write the
class, but I really want to use VB. Please let me know if you need
more information. Thanks for the help.
 

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,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top