web control

H

Harley

Can anyone help?

I am trying to convert a web control from c# to vb.net.

The c# code has the following:-
public class Test: System.Web.UI.HtmlControls.HtmlInputHidden,
IPostBackDataHandler

I though this would translate to the following:
Public Class Test
Inherits System.Web.UI.HtmlControls.HtmlInputHidden
Implements System.Web.UI.IPostBackDataHandler

When I try to implement this in VB (see code below) I get the following
error messages:-
1) with implements - interface System.Web.UI.IPostBackDataHandler is already
implemented by System.Web.UI.HtmlControls.HtmlInputHidden

2) without implements - interface System.Web.UI.IPostBackDataHandler is not
implemented by this class


Help?

Thanks for any assistance.

----------------------------------------------------------------------------
------------------------

Public Class Test
Inherits System.Web.UI.HtmlControls.HtmlInputHidden
Implements System.Web.UI.IPostBackDataHandler

Public Function RaisePostDataChangedEvent(ByVal postDataKey As
String, ByVal values As System.Collections.Specialized.NameValueCollection)
As Boolean Implements
System.Web.UI.IPostBackDataHandler.RaisePostDataChangedEvent
End Function

Public Function LoadPostData(ByVal postDataKey As String, ByVal
postCollection As System.Collections.Specialized.NameValueCollection) As
Boolean Implements System.Web.UI.IPostBackDataHandler.LoadPostData
End Function

End Class
 
M

Miha Markic

Hi Harley,

HtmlInputHidden akready implements IPostBackDataHandler thus error 1) is
correct (I guess C# compiler doesn't raise an error or warning).
When do you get error 2?
 

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

Top