473,386 Members | 1,745 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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

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.
Mar 1 '06 #1
1 2673
DWS
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.

Mar 1 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: John Lau | last post by:
Hi, Is there documentation that talks about the page lifecycle, the lifecycle of controls on the page, and the rendering of inline code, in a single document? Thanks, John
1
by: One Handed Man \( OHM - Terry Burns \) | last post by:
I have implemented the System.Web.UI.IPostBackDataHandler.LoadPostData interface in my custom control, however, when I submit this Function is not called by ASP.NET ( Which is what I assume is...
3
by: Martin | last post by:
Hi, I have created a composite control that has a number of standard asp.net controls on it that can themselves cause postbacks. What i need to do in my composite control is to determine which...
7
by: Frédéric Mayot | last post by:
Hi I'm trying to define a skin for a custom control. I can't see how to do it... My custom control inherits from a TextBox but it doesn't recognize the skinID defined for asp:TextBox. Any idea ?...
2
by: J R M | last post by:
I've developed a custom control (it's basically a drop-down list and then a couple of textboxes to include meta-data for the selection) that I'm embedding into another custom control (the idea is...
0
by: webmaster | last post by:
Hi all, I'm tearing my hair out with this one. I have successfully implemented by own RadioButtonList in order to provide additional functionality and a DIV rather than TABLE-based layout in...
1
by: rn5a | last post by:
I want to create a custom control that encapsulates a Button & a TextBox. When the Button is clicked, the user is asked a question using JavaScript confirm (which shows 2 buttons - 'OK' &...
2
by: Michal Valent | last post by:
I would like to fire some custom server control event before Page_Load event like this (from the trace of an aspx page) : Trace Information Category Message From First(s) From Last(s) aspx.page...
7
by: adiel_g | last post by:
Hello Everyone, I created a custom control. On the CreateChildControls, I added a textbox to the control as follows: // TextBox TextBox txtValue = new TextBox(); txtValue.ID = "txtValue"; ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.