Ask a Question related to ASP.NET Building Controls, Design and Development.
-
Andrew Dawson #1
Implementing IPostBackDataHandler in a custom web control with VB.NET
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.
Andrew Dawson Guest
-
ListControl: SelectedIndexChanged event raised without implementing IPostBackDataHandler?
Hi, I'm designing a control that inherits ListControl I was surprised to see that SelectedIndexChanged is part of ListControl. So why doesn't it... -
IPostBackDataHandler and validating a control -- the best place to do this.
Hi, I have an asp.net page with two composite controls on it as well as a single button in the asp.net page AND a single dropdown box on the page... -
Implementing columns collection in Data grid custom control
Dear all, I am building a custom control data grid with some necessary functionalities. let it be <myCustomDataGrid> in .Net data grid we have... -
Implementing postback functionality in custom control
Here is my situation. I first made a custom composite control (consisting of a textbox and button) that does a whois lookup based on the domain name... -
Implementing Control Designer Class for Composite Server Control
I created a custom composite server control with 2 literals and 1 text box. The control displays fine in internet explorer, but doesnt display... -
Teemu Keiski #2
Re: Implementing IPostBackDataHandler in a custom web control with VB.NET
Hi,
this is a lack of feature in VB.NET. It doesn't allow you to reimplement an
interface on derived class, but C# does.
See here:
[url]http://weblogs.asp.net/fbouma/archive/2003/11/12/37199.aspx[/url]
--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
[url]http://blogs.aspadvice.com/joteke[/url]
"Andrew Dawson" <adawson@ufcw.org> wrote in message
news:4fc58d42.0408091241.6ed1f838@posting.google.c om...> 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.
Teemu Keiski Guest



Reply With Quote

