PC Review


Reply
Thread Tools Rate Thread

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

 
 
z f
Guest
Posts: n/a
 
      1st Mar 2006
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.


 
Reply With Quote
 
 
 
 
=?Utf-8?B?RFdT?=
Guest
Posts: n/a
 
      1st Mar 2006
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




"z f" wrote:

> 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.
>
>
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
about inherits custom control =?Utf-8?B?YnVsZQ==?= Microsoft Dot NET Compact Framework 2 6th Mar 2007 04:34 PM
putting custom control on a form that inherits from my form class, doesn't work Capital O Microsoft Dot NET Compact Framework 2 4th Jan 2006 05:36 PM
How to highlight text in a custom control that inherits from the control class? news.austin.rr.com Microsoft Dot NET Compact Framework 0 1st Mar 2005 06:37 PM
Inherits from Control, Yay, Inherits from WebControl, Nay.... Alex Nitulescu Microsoft ASP .NET 0 22nd Feb 2005 05:55 AM
Custom Control & System.Web.UI.IPostBackDataHandler.LoadPostData One Handed Man \( OHM - Terry Burns \) Microsoft ASP .NET 1 17th Jun 2004 07:07 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:56 AM.