Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 12th, 2004, 09:02 AM
Authorized User
 
Join Date: Sep 2003
Posts: 93
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to flyin
Default Render a UserCotrol question

I have a question on how to render a usercontrol and have it's rendered html be stored in string form.

so for instance,

UserControl: UC_Header.ascx

Is there a way to do something like:

In Default.aspx:

Dim Header as new UC_Header()
Dim sHeader as string = Header.Render()

So when i call the render method it will run the control as normal and call it's page_load method and return me back the same html as if it were called by the page as normal.

thanks in advanced!

 
Old September 12th, 2004, 03:42 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

I think that the Render() method takes an HtmlWriter class as an argument. Perhaps you can create an instance of that so that you can "capture" the output HTML stream.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Render HTML tags jacksprophet XSLT 1 December 28th, 2006 07:03 PM
Zoom in the render Tepox2000 Reporting Services 0 October 24th, 2006 12:19 PM
RenderControl and Render methods joxa83 ASP.NET 1.x and 2.0 Application Design 4 August 24th, 2006 08:10 AM
Render and credentials TonyStoker Reporting Services 0 May 17th, 2006 05:53 PM
Render to Printer kirbykn BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 0 April 21st, 2005 03:17 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.