473,378 Members | 1,389 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,378 software developers and data experts.

Question on building Web Custom Controls

The 'Render' method of a Web Custom Control takes an argument 'output'
of type System.Web.UI.HtmlTextWriter. This HtmlTextWriter renders any
content in the 'Render' method.

I am trying to render the content of my control in ANOTHER method.
When I try to create a new HtmlTextWriter in that method with the
code:

Dim writer As New StringWriter
Dim output2 As New HtmlTextWriter(writer)
output2.Write("TEST")

....it does nothing. This method is being called by another control to
in order to render some content. Can someone please advise how I can
render content from a custom method in a Web Custom Control.

Thanks in advance for any help.
Nov 18 '05 #1
1 882
"The Alchemist" <al*******@lycos.com> wrote in message
news:ee*************************@posting.google.co m...
The 'Render' method of a Web Custom Control takes an argument 'output'
of type System.Web.UI.HtmlTextWriter. This HtmlTextWriter renders any
content in the 'Render' method.

I am trying to render the content of my control in ANOTHER method.
When I try to create a new HtmlTextWriter in that method with the
code:

Dim writer As New StringWriter
Dim output2 As New HtmlTextWriter(writer)
output2.Write("TEST")

...it does nothing. This method is being called by another control to
in order to render some content. Can someone please advise how I can
render content from a custom method in a Web Custom Control.


What is the value of writer.ToString() after the Write? You may also need to
use output2.Flush() before you see the result.
--
John Saunders
johnwsaundersiii at hotmail
Nov 18 '05 #2

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

Similar topics

2
by: El Presidente | last post by:
I like the look and feel of the Microsoft AntiSpyWare applicaiton. I could envision this look and feel for a project I am currently working on. Can I do this with Visual Studio.NET 2003? Are...
55
by: Steve Jorgensen | last post by:
In a recent thread, RKC (correctly, I believe), took issue with my use of multiple parameters in a Property Let procedure to pass dimensional arguments on the basis that, although it works, it's...
1
by: PCC | last post by:
I am using the Infragistics UltraWebNavigator menu control and am having trouble building my menu hierarchy either by data binding or coding it manually. I have included a sample of my Menu table...
1
by: The Alchemist | last post by:
The 'Render' method of a Web Custom Control takes an argument 'output' of type System.Web.UI.HtmlTextWriter. This HtmlTextWriter renders any content in the 'Render' method. I am trying to render...
0
by: chris fink | last post by:
Hello, Is is possible to control a custom control like the asp.net server controls without making it into an assembly? For example, if my custom control was named <MYCONTROL:CONTROL1 .....> is...
2
by: Hazzard | last post by:
I just realized that the code I inherited is using all asp.net server controls (ie. webform controls) and when I try to update textboxes on the client side, I lose the new value of the textbox when...
8
by: Smkmdb1 | last post by:
Hi everyone, I'm a student of ASP.net. Being an ex Perl/CGI programmer who made extra cash making scripts and selling them on the web, I was wondering if one typically uses this format with...
3
by: matthias s. | last post by:
Hi there, I'm building a usercontrol to provide language selection options. The availabe languages are retrieved dynamically and should be shown as flags (ImageButtons) in a table. But I've...
2
by: Laurent Bugnion | last post by:
Hi, I like to develop custom controls for a number of webpages. These controls are often customizable, so that they can be reused in a number of situations. My question is: What is the best...
9
by: Mike Hofer | last post by:
In a large application I'm working on (ASP.NET 1.1, VS2003), we have a base class that wraps stored procedures. Essentially, this base class (StoredProcedureBase) encapsulates the code to set up...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
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
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.