a custom control in VB.NET that inherits from TextBox and from IPostBackDataHandler....

Z

z f

Hi.

How can I make a custom control in VB.NET that is inheriting from TextBox
and also implements/inherits the IPostBackDataHandler?
the problem is that in VB.NET I can't inherit from more that one class, but
when I try to inherit from TextBox and Implement IPostBackDataHandler i get
an error of
"Interface 'System.Web.UI.IPostBackDataHandler' is already implemented by
base class 'System.Web.UI.WebControls.TextBox'."
but if I want to override the LoadPostData of the IPostBackDataHander
implemented by the TextBox class I just Can't!
it is probably private.
So I can't achive what can be achived easily using C# - inheriting from
TextBox and from IPostBackDataHandler?
VB Gurus please help!

TIA.
 
G

Guest

Zf,
First off ASP.Net validates that the postbackdata does not contain malious
content and other validations before it reaches your code. Try designing
using the textbox changed event like the rest of us.

To use interface implemented by base class use mybase. Example mybase.focus
To change a method, or function that is implemented by the base class use
overrides. Type in OVERRIDES (outside of any method,function, sub) and select
from dropdown list press enter.

Good Luck
DWS
 

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

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top