473,320 Members | 2,071 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,320 software developers and data experts.

Rendering an aspx form output

Hi guys

I want to use the output of an aspx form and render it to screen as a
'preview' of the page.

With an html file its easy but obviously an aspx page has to be run, and
then the finished html generated is what i then want.

How do i do this in .net 2?

Jul 13 '07 #1
1 1425
On Jul 13, 5:20 pm, "PokerMan" <nos...@pokercat.co.ukwrote:
Hi guys

I want to use the output of an aspx form and render it to screen as a
'preview' of the page.

With an html file its easy but obviously an aspx page has to be run, and
then the finished html generated is what i then want.

How do i do this in .net 2?

hi...
you can take out the html from your page and then dump in some place
and then show it to user...
System.Text.StringBuilder sb = new System.Text.StringBuilder();
System.IO.StringWriter swriter = new System.IO.StringWriter(sb);
HtmlTextWriter hwriter = new HtmlTextWriter(swriter);
this.FormView1.RenderControl(hwriter);
string outputstring = sb.ToString();

in this way you can get the generated html...

www.snap.com have a tool to show website preview for the links... if
they can do why you can't do it...

Thanks
Md. Masudur Rahman (Munna)
kaz Software Ltd.
www.kaz.com.bd
http://munnacs.110mb.com

Jul 14 '07 #2

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

Similar topics

5
by: ken | last post by:
I have a XML file as below ---------------------------------------------------------------------------------------------------------------------- <?xml version="1.0" standalone="yes"?> ...
0
by: threecrans | last post by:
If you create a new server control, and override the Render method with the following code: protected override void Render(HtmlTextWriter output) { // <TABLE id="mytable">...
6
by: A.M-SG | last post by:
Hi, Within my code behind's Page_Load event, I need to prevent the aspx contents be rendered. I tried to use Response.End() , but ASP.NET gives me "System.Threading.ThreadAbortException"...
2
by: Spotnick | last post by:
I have no idea why, but since I'm trying to recreate my website using ASP.NET 2.0 I've encountered so many performance issues that I'm about to give up and continue using v1.1 Seriously, how can...
2
by: Giedrius | last post by:
hi, i have an idea to make admin tool on home computer, that would generate html files using some kind of templates and database data and put these generated html files to public web server, witch...
5
by: paul.hester | last post by:
Hi all, I have a custom control with an overridden Render method. Inside this method I'm rendering each control in its collection using their RenderControl method. However, I'm running into a...
3
by: Peter Nofelt | last post by:
On Server.Transfer(), is there a reason why the previous page's elements would appear on the new page? Note: this transfer is occuring between two pages on the same server. <Scenario> I'm using...
2
crabpot8
by: crabpot8 | last post by:
I am working on a message system that will let out programmers easily output a message to any user. It works fine, unless the message is requested inside of a page_load on an aspx page. Then, it does...
1
by: =?Utf-8?B?TUNN?= | last post by:
Is it possible to have .NET controls render as HTML 4.01 Strict compliant? In web.config, there is xhtml conformance, but that does not provide an option for HTML 4.01.
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.