Making a Preview Page

  • Thread starter Thread starter JJ
  • Start date Start date
J

JJ

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
 
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
 
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
 
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 said:
On Jun 13, 11:08 am, "JJ" <[email protected]> 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)?

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
 
JJ said:
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 said:
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
 
Back
Top