I have some html in a textbox. I'd like to have a 'preview' button that
allows the user to see what the html would look like as rendered in a page.
How could I do this without having to write the document temporarily to a
database (or other data store)?
Thanks,
JJ 9 1272
On Jun 13, 11:08 am, "JJ" <a...@xyz.comwrote:
I have some html in a textbox. I'd like to have a 'preview' button that
allows the user to see what the html would look like as rendered in a page.
How could I do this without having to write the document temporarily to a
database (or other data store)?
Thanks,
JJ
Could you maybe store the html in a Session variable, and open up a
new window, where you check to see if said Session variable isn't
null, and then just display it on that new blank screen
does that work for you?
How much can a session variable store? Might I run into problems if the html
code is quite long?
Is there a way perhaps to 'post' the textbox text to another page which
simply displays what it receives ?
Thanks,
JJ
"chanko" <ch****@gmail.comwrote in message
news:11*********************@i38g2000prf.googlegro ups.com...
On Jun 13, 11:08 am, "JJ" <a...@xyz.comwrote:
>I have some html in a textbox. I'd like to have a 'preview' button that allows the user to see what the html would look like as rendered in a page. How could I do this without having to write the document temporarily to a database (or other data store)?
Thanks, JJ
Could you maybe store the html in a Session variable, and open up a
new window, where you check to see if said Session variable isn't
null, and then just display it on that new blank screen
does that work for you?
On Jun 13, 11:15 am, chanko <cha...@gmail.comwrote:
On Jun 13, 11:08 am, "JJ" <a...@xyz.comwrote:
I have some html in a textbox. I'd like to have a 'preview' button that
allows the user to see what the html would look like as rendered in a page.
How could I do this without having to write the document temporarily to a
database (or other data store)?
Thanks,
JJ
Could you maybe store the html in a Session variable, and open up a
new window, where you check to see if said Session variable isn't
null, and then just display it on that new blank screen
does that work for you?
oh, and the way i would probably display it
is place a div in your aspx page with a runat=server tag, and in
codebehind
div.InnerHtml = Session["variable"].ToString();
or even, i think you can add a <asp:Literal... object in aspx page,
and just assign the session variable to the literal object Text
property
On Jun 13, 11:25 am, chanko <cha...@gmail.comwrote:
On Jun 13, 11:15 am, chanko <cha...@gmail.comwrote:
On Jun 13, 11:08 am, "JJ" <a...@xyz.comwrote:
I have some html in a textbox. I'd like to have a 'preview' button that
allows the user to see what the html would look like as rendered in a page.
How could I do this without having to write the document temporarily to a
database (or other data store)?
Thanks,
JJ
Could you maybe store the html in a Session variable, and open up a
new window, where you check to see if said Session variable isn't
null, and then just display it on that new blank screen
does that work for you?
oh, and the way i would probably display it
is place a div in your aspx page with a runat=server tag, and in
codebehind
div.InnerHtml = Session["variable"].ToString();
or even, i think you can add a <asp:Literal... object in aspx page,
and just assign the session variable to the literal object Text
property
well, you can store whatever you want in a session variable
i don't think that being just plain text, it would matter that much
how long the html would be
other than that i'm not sure any other way to do it, without storing
it some place
maybe somebody else can give you a better idea as to how to achieve
this
good luck
Thanks - I'll give your suggestion a go.
JJ
"chanko" <ch****@gmail.comwrote in message
news:11*********************@z28g2000prd.googlegro ups.com...
On Jun 13, 11:25 am, chanko <cha...@gmail.comwrote:
>On Jun 13, 11:15 am, chanko <cha...@gmail.comwrote:
On Jun 13, 11:08 am, "JJ" <a...@xyz.comwrote:
I have some html in a textbox. I'd like to have a 'preview' button
that
allows the user to see what the html would look like as rendered in a
page.
How could I do this without having to write the document temporarily
to a
database (or other data store)?
Thanks,
JJ
Could you maybe store the html in a Session variable, and open up a
new window, where you check to see if said Session variable isn't
null, and then just display it on that new blank screen
does that work for you?
oh, and the way i would probably display it is place a div in your aspx page with a runat=server tag, and in codebehind
div.InnerHtml = Session["variable"].ToString();
or even, i think you can add a <asp:Literal... object in aspx page, and just assign the session variable to the literal object Text property
well, you can store whatever you want in a session variable
i don't think that being just plain text, it would matter that much
how long the html would be
other than that i'm not sure any other way to do it, without storing
it some place
maybe somebody else can give you a better idea as to how to achieve
this
good luck
<HTML>
<HEAD>
<script>
function openWrite( strHtml)
{
win2=window.open("") //open blank window and write to it
win2.document.open() //open document stream
win2.document.write( strHtml)
win2.document.close()
}
</script>
</HEAD>
<BODY>
<TextArea id=txtH onclick="openWrite(this.innerText);"><h3>this is some
html</h3></textarea>
</BODY>
-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net
"JJ" wrote:
I have some html in a textbox. I'd like to have a 'preview' button that
allows the user to see what the html would look like as rendered in a page.
How could I do this without having to write the document temporarily to a
database (or other data store)?
Thanks,
JJ
Ahh the solution is simple when you know how...
Thanks Peter,
JJ
"Peter Bromberg [C# MVP]" <pb*******@yahoo.yabbadabbadoo.comwrote in
message news:89**********************************@microsof t.com...
<HTML>
<HEAD>
<script>
function openWrite( strHtml)
{
win2=window.open("") //open blank window and write to it
win2.document.open() //open document stream
win2.document.write( strHtml)
win2.document.close()
}
</script>
</HEAD>
<BODY>
<TextArea id=txtH onclick="openWrite(this.innerText);"><h3>this is some
html</h3></textarea>
</BODY>
-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net
"JJ" wrote:
>I have some html in a textbox. I'd like to have a 'preview' button that allows the user to see what the html would look like as rendered in a page. How could I do this without having to write the document temporarily to a database (or other data store)?
Thanks, JJ
"JJ" <ab*@xyz.comwrote in message
news:uw**************@TK2MSFTNGP04.phx.gbl...
>I have some html in a textbox. I'd like to have a 'preview' button that allows the user to see what the html would look like as rendered in a page.
How could I do this without having to write the document temporarily to a
database (or other data store)?
A really cool way of doing this is to create put all your current contact in
a div and then have another hidden div also. - then when the user clicks
preview - your current div is hidden and the other divs innerhtml is changed
to your textbox txt and then shown.
way cool
Kal
Thanks,
JJ
"kal" <ak*@noplace.comwrote in message
news:yT*****************@newsfe3-gui.ntli.net...
>
"JJ" <ab*@xyz.comwrote in message
news:uw**************@TK2MSFTNGP04.phx.gbl...
>>I have some html in a textbox. I'd like to have a 'preview' button that allows the user to see what the html would look like as rendered in a page. How could I do this without having to write the document temporarily to a database (or other data store)?
A really cool way of doing this is to create put all your current contact
in a div and then have another hidden div also. - then when the user
clicks preview - your current div is hidden and the other divs innerhtml
is changed to your textbox txt and then shown.
way cool
Kal This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Martin S |
last post by:
I have a form that sends data on to another page so that the user can
preview it before it is inserted in a database table.
The problem is that the form sends both text and possibly an image to...
|
by: Mike |
last post by:
Sites using thumbnail preview for world wide web file navigation and
searching.
Below are list of sites that are either researching or providing thumbnail
preview images for online web...
|
by: Neo Geshel |
last post by:
I'm helping on a web site, and it's got our knickers in a knot. We're
using the same basic CSS files (with mods) and same headers as from our
other sites, but the "print preview" won't work...
|
by: Dave A |
last post by:
I am writing an ASP.NET tool that will allow the client to create their own
online froms. ie the client can add tect boxes, text, drop downs,etc with
absolutely no technical skill what so ever....
|
by: Syam |
last post by:
Hello everyone,
I am just barely two months old into learning asp.net and vb.net. Currently
I am working on a project to store customer database. I have a question about
creating a preview page:...
|
by: bonnie.tangyn |
last post by:
Hello All
In my ASP page, I use CDONT to send email to client. But, I need to
allow user preview and edit the email content before sending it out.
Any advices?
I have two ASP pages -...
|
by: igotyourdotnet |
last post by:
I need to create a print preview page BUT my page I need to print has a grid
and in the grid I have 2 or 3 columns that have links I want to hide the
columns with the links on my print preview page...
|
by: The Natural Philosopher |
last post by:
I have a databse containing amongst other things many images stored as
BLOBS.
When listing, currently I download all the images full size and let he
browser do the reduction to thumbnails.
...
|
by: Kerem Gümrükcü |
last post by:
Hi,
i use the code from this code sample on MSDN:
for printing a 5 and sometimes 70 page text-only
data: http://msdn.microsoft.com/en-us/library/ms404294.aspx
The point is, that this is...
|
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...
|
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
|
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...
|
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: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
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...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
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...
|
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,...
| |