Hello,
I have been creating a few controls and I have a problem.
I want to create a control that renders a TextBox, a Label, and a few
more controls.
Is it possible to create such a control without all these controls to
be wrapped in a Tag?
Thanks,
Miguel 3 1120
Hello Miguel
I have been creating a few controls and I have a problem.
I want to create a control that renders a TextBox, a Label, and a few
more controls.
Is it possible to create such a control without all these controls to
be wrapped in a Tag?
Yes its possible.
You can use a UserControl for this requirements, or also a CustomControl
thats inherited from CompositeContro l
or also from any other control.
--
Gruss, Peter Bucher
Microsoft MVP - Visual Developer ASP / ASP.NET, Switzerland http://www.aspnetzone.de/ - ASP.NET Zone, die ASP.NET Community http://www.aspnetzone.de/blogs/peterbucher/ - Auf den Spuren von .NET
On Dec 19, 1:14 pm, "Peter Bucher [MVP]" <peter.buc...@a spnetzone.de>
wrote:
Hello Miguel
I have been creating a few controls and I have a problem.
I want to create a control that renders a TextBox, a Label, and a few
more controls.
Is it possible to create such a control without all these controls to
be wrapped in a Tag?
Yes its possible.
You can use a UserControl for this requirements, or also a CustomControl
thats inherited from CompositeContro l
or also from any other control.
--
Gruss, Peter Bucher
Microsoft MVP - Visual Developer ASP / ASP.NET, Switzerlandhttp ://www.aspnetzone. de/- ASP.NET Zone, die ASP.NET Communityhttp://www.aspnetzone. de/blogs/peterbucher/- Auf den Spuren von .NET
Not really.
Every time I create a custom control that inherits from WebControl or
CompositeContro l it renders as a Span tag with all child controls
inside it.
Of course I can change the render begin and end tag by using:
Public Overloads Overrides Sub RenderBeginTag( ByVal writer As
HtmlTextWriter)
writer.RenderBe ginTag(HtmlText WriterTag.Div)
End Sub
But what I would like is the control to render its child controls but
not having them wrapped.
Is this possible?
Thanks,
Miguel
Hallo Miguel
But what I would like is the control to render its child controls but
not having them wrapped.
Is this possible?
Yes, simply overwrite the whole Render methode of your control.
Or else for an other case, overwrite the property TagKey to set a specific
tag around
instead of RenderBegin- and RenderEndTag overrides.
--
Gruss, Peter Bucher
Microsoft MVP - Visual Developer ASP / ASP.NET, Switzerland http://www.aspnetzone.de/ - ASP.NET Zone, die ASP.NET Community http://www.aspnetzone.de/blogs/peterbucher/ - Auf den Spuren von .NET This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Jeff Schaefer |
last post by:
What I want to know is this: Is it possible to programmatically manipulate a
custom property of a user control for which <%@ OutputCache ... > has been
included? If so, then how? My brief code is at the end of this message.
The Microsoft documentation is a bit confusing to me. The following numbered
sentences appear in the .NET Framework Developer's Guide article titled
"Caching Portions of an ASP.NET Page":
1. You can declare an ID...
|
by: Steve Franks |
last post by:
In ASP.NET 2.0 you can now apparently do this:
<asp:label runat="server" text="some browser" IE:text="any IE browser"
IE5:text="the IE 5 browser" PIE:text="the Pocket PC browser" />
Now the tokens "IE5" and "PIE" are coming from the updated browser
capabilities component.
I'd like to do the same thing, but create my own tokens that have nothing to
do with the browser capabilities component because I love the convenience
this offers.
|
by: BradC |
last post by:
(VB.NET 2002, Windows app).
I'm going to be provided a two-letter string like "BV" or "TP" that
represents a location.
I then need to perform some actions on several form controls that have names
derived from that location.
For example: lblBVimp, txtBVsignoff, txtBVsignoffdate, chkBV
Now I know i can do a "For Each XXX in myForm.Controls", If XXX.name =
blahblahblah,
|
by: Captain Chaos |
last post by:
Hello
Is it Possible to build an ActiveX Control with NET ?
I want to take a NET UserControl and use it with VB6.
I found a solution how to embbed a NET UserControl into
a WebPage (Like it was possible with ActiveX Control)
http://www.vbdotnetheaven.com/Code/Jun2003/2067.asp
|
by: Tony Johansson |
last post by:
Hello!
I have one solution file that consist of three project.
One project that build the exe file called A
One project that build a user control dll. Here we have a class called B
One project that build a class library dll. Here we have a class called C
We have one dependency and that is from the user control to the class
library because
in the constructor for class B in the user control we have a call to
| |
by: Sevu |
last post by:
I am working with ASP.NET.I am using ReportViwer Control to show my
report.I like to add dropdownlist with in the reportviewer control. (
Not top to the control some thing like that).I need to place dropdown
near to Export link ( Excel and PDF Export).Is it possible to add at
the dropdown list with in report viewer control?. I found the property
as ReportViewer.Controls.Add.But its not working.Please help me.
Regards,
S.Sevugan.
|
by: planetthoughtful |
last post by:
Hi All,
I have a Web User Control that I would like to use in several pages in
my ASP.NET application.
I'm wondering, however, if it's possible to call a function contained
in the page from within the Web User Control?
To give a little more detail:
|
by: Hamed |
last post by:
Hello
Is it possible to get a control (e.g. a checkbox) and make a Graphics object
or a Bitmap object of current face of the control?
I want to implement Sparse property for a ColumnStyle so I need above
functionality.
Regards
|
by: Webbert |
last post by:
I am trying to display XML in a WebBrowser Control. I receive a data feed of
XML and am trying to inject it into the control. I have not been successful
in doing so.
The only solution I have found is to write it to a temp file and then use
the Navigate method to load it. As the control is capable of loading it from
disk, I would like to find a way to skip the save/load and just inject.
Thanks,
Dave
|
by: shapper |
last post by:
Hello,
I am creating a user control where an Asp.Net control is used. It can
be either a button, an image button or a label.
I am trying to "expose" the Asp.Net control properties and events in
the page where the user control is used.
For that I defined a property as follows:
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |