473,378 Members | 1,334 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.

Render the asp: markup from a WebControl


Hi everybody,

I'm new to codecomments, but I really hope someone can help me.

I am dynamically loading custom controls and user controls into my
htmlform control. As I have a lot of "custom" data and controls to use,
I am basically creating a string with the markup, using
Page.ParseControl to obtain this as a control (with childcontrols) and
then adding the result to the form's control collection.

However, in order to maintain viewstate, what would be ideal would be
to actually write the <asp:control id=... runat=server markup of some
controls to this string that I am parsing and adding in the page's
OnInit event.

Does anyone have any idea how to, given an instance of a WebControl,
write the asp.net markup as opposed to the resulting HTML markup?

I hope I have made myself at least slightly intelligible, and thank you
very much in advance.

Tom.

--
tommyw
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------

Jan 16 '06 #1
0 1055

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

Similar topics

4
by: Ron Vecchi | last post by:
I have a custom control which has a child control (PlaceHolder) The placeholder will have any number of child controls added to it. I would like to catch the rendered content of the placeholder...
2
by: Ronen | last post by:
Hi, I am writing a grid Web control library. The grid has some client side JavaScript to enable columns resize, sorting, row selection etc. I have some problems adding the JavaScript...
1
by: Alex Nitulescu | last post by:
Hi. What's the difference between the Render method (overridden when creating custom controls) and the RenderContents method.... (overridden when creating custom controls) ? From MSDN: ...
0
by: tommyw | last post by:
I worked out a solution to this incase anyone wants to know. Rather than rendering the asp markup for the control itself, I simply rendered an asp:placeholder tag, parsed the string into a...
2
by: MichaelY | last post by:
I am using a treeview control for data display, and am having a bit of a hard time getting the thing styled the way I need it. There appears to be empty rows added in between the tree nodes,...
1
by: WT | last post by:
Hello, I recently discovered that Page.Render is doing special things concerning the Menu navigation control. When I was using my own Render override, menus were not working, maybe some style...
0
by: Henrik Stidsen | last post by:
I need to get the HTML output from a webcontrol as a string instead of it being rendered on the page. I have the following code: Dim SiteMapSource As New SiteMapDataSource() Dim TreeView1...
0
by: Jeff | last post by:
hey asp.net 3.5 I have 2 UpdatePanels in my webpage. This webpage has a GridView, which one of its column is a templatefield which again contain a UpdatePanel and a button... The other...
4
by: Ken Fine | last post by:
I've been living with a frustrating issue with VS.NET for some months now and I need to figure out what the problem is. Hopefully someone has run into the same issue and can suggest a fix. I...
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: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: 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?
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.