Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Dynamically generated page

Reply
Thread Tools

Dynamically generated page

 
 
Matjaz Zalar
Guest
Posts: n/a
 
      11-25-2003
Hi,
I have following problem:
1. template content is stored in database string field, for example:

"<HTML><HEAD></HEAD><BODY ID="BODYTAG"></BODY></HTML>

2. page content is also stored in database:

"<div>Hello Problem!!</div>"

3. page.aspx must first load template value and then inserts into template
body innerHTML value of content.

Question:

Is there any possibility to access body through ID:

BODYTAG.innerHTML = "<div>Hello Problem!!</div>"

Thanks for Your reply,


Matjaz Zalar


 
Reply With Quote
 
 
 
 
S. Justin Gengo
Guest
Posts: n/a
 
      11-25-2003
Matjaz,

Yes you can access the body tag from code-behind.

I have sample code on my website: www.aboutfortunate.com. Just go to the
code library and then use the search text box there. Enter "Use body tag as
server control" or something similar and you'll find the sample code.

Any questions? Feel free to email me (Anyone).

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche


"Matjaz Zalar" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Hi,
> I have following problem:
> 1. template content is stored in database string field, for example:
>
> "<HTML><HEAD></HEAD><BODY ID="BODYTAG"></BODY></HTML>
>
> 2. page content is also stored in database:
>
> "<div>Hello Problem!!</div>"
>
> 3. page.aspx must first load template value and then inserts into template
> body innerHTML value of content.
>
> Question:
>
> Is there any possibility to access body through ID:
>
> BODYTAG.innerHTML = "<div>Hello Problem!!</div>"
>
> Thanks for Your reply,
>
>
> Matjaz Zalar
>
>



 
Reply With Quote
 
 
 
 
Matjaz Zalar
Guest
Posts: n/a
 
      11-25-2003
Thanks,
but your example simply add new generic HTML control. I have already specify
BODY tag in template, so your approach would give me another BODY
tag-control which has no relation to template BODY tag.

"S. Justin Gengo" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Matjaz,
>
> Yes you can access the body tag from code-behind.
>
> I have sample code on my website: www.aboutfortunate.com. Just go to the
> code library and then use the search text box there. Enter "Use body tag

as
> server control" or something similar and you'll find the sample code.
>
> Any questions? Feel free to email me (Anyone).
>
> --
> Sincerely,
>
> S. Justin Gengo, MCP
> Web Developer / Programmer
>
> Free code library at:
> www.aboutfortunate.com
>
> "Out of chaos comes order."
> Nietzche
>
>
> "Matjaz Zalar" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
> > Hi,
> > I have following problem:
> > 1. template content is stored in database string field, for example:
> >
> > "<HTML><HEAD></HEAD><BODY ID="BODYTAG"></BODY></HTML>
> >
> > 2. page content is also stored in database:
> >
> > "<div>Hello Problem!!</div>"
> >
> > 3. page.aspx must first load template value and then inserts into

template
> > body innerHTML value of content.
> >
> > Question:
> >
> > Is there any possibility to access body through ID:
> >
> > BODYTAG.innerHTML = "<div>Hello Problem!!</div>"
> >
> > Thanks for Your reply,
> >
> >
> > Matjaz Zalar
> >
> >

>
>



 
Reply With Quote
 
S. Justin Gengo
Guest
Posts: n/a
 
      11-25-2003
Matajaz,

You didn't look closely enough. The code doesn't add a second body control
tag. It converts the original into a server side control that can be
manipulated.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche


"Matjaz Zalar" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Thanks,
> but your example simply add new generic HTML control. I have already

specify
> BODY tag in template, so your approach would give me another BODY
> tag-control which has no relation to template BODY tag.
>
> "S. Justin Gengo" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Matjaz,
> >
> > Yes you can access the body tag from code-behind.
> >
> > I have sample code on my website: www.aboutfortunate.com. Just go to the
> > code library and then use the search text box there. Enter "Use body tag

> as
> > server control" or something similar and you'll find the sample code.
> >
> > Any questions? Feel free to email me (Anyone).
> >
> > --
> > Sincerely,
> >
> > S. Justin Gengo, MCP
> > Web Developer / Programmer
> >
> > Free code library at:
> > www.aboutfortunate.com
> >
> > "Out of chaos comes order."
> > Nietzche
> >
> >
> > "Matjaz Zalar" <(E-Mail Removed)> wrote in message
> > news:%(E-Mail Removed)...
> > > Hi,
> > > I have following problem:
> > > 1. template content is stored in database string field, for example:
> > >
> > > "<HTML><HEAD></HEAD><BODY ID="BODYTAG"></BODY></HTML>
> > >
> > > 2. page content is also stored in database:
> > >
> > > "<div>Hello Problem!!</div>"
> > >
> > > 3. page.aspx must first load template value and then inserts into

> template
> > > body innerHTML value of content.
> > >
> > > Question:
> > >
> > > Is there any possibility to access body through ID:
> > >
> > > BODYTAG.innerHTML = "<div>Hello Problem!!</div>"
> > >
> > > Thanks for Your reply,
> > >
> > >
> > > Matjaz Zalar
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
Matjaz Zalar
Guest
Posts: n/a
 
      11-26-2003
In Your example there is <body> tag in html part of webform. Mine page.aspx
have NO BODY TAG or any one eather! The HTML part is loaded from database
value first for template and then for content.

Matjaz



"S. Justin Gengo" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Matajaz,
>
> You didn't look closely enough. The code doesn't add a second body control
> tag. It converts the original into a server side control that can be
> manipulated.
>
> --
> Sincerely,
>
> S. Justin Gengo, MCP
> Web Developer / Programmer
>
> Free code library at:
> www.aboutfortunate.com
>
> "Out of chaos comes order."
> Nietzche
>
>
> "Matjaz Zalar" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Thanks,
> > but your example simply add new generic HTML control. I have already

> specify
> > BODY tag in template, so your approach would give me another BODY
> > tag-control which has no relation to template BODY tag.
> >
> > "S. Justin Gengo" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > Matjaz,
> > >
> > > Yes you can access the body tag from code-behind.
> > >
> > > I have sample code on my website: www.aboutfortunate.com. Just go to

the
> > > code library and then use the search text box there. Enter "Use body

tag
> > as
> > > server control" or something similar and you'll find the sample code.
> > >
> > > Any questions? Feel free to email me (Anyone).
> > >
> > > --
> > > Sincerely,
> > >
> > > S. Justin Gengo, MCP
> > > Web Developer / Programmer
> > >
> > > Free code library at:
> > > www.aboutfortunate.com
> > >
> > > "Out of chaos comes order."
> > > Nietzche
> > >
> > >
> > > "Matjaz Zalar" <(E-Mail Removed)> wrote in message
> > > news:%(E-Mail Removed)...
> > > > Hi,
> > > > I have following problem:
> > > > 1. template content is stored in database string field, for example:
> > > >
> > > > "<HTML><HEAD></HEAD><BODY ID="BODYTAG"></BODY></HTML>
> > > >
> > > > 2. page content is also stored in database:
> > > >
> > > > "<div>Hello Problem!!</div>"
> > > >
> > > > 3. page.aspx must first load template value and then inserts into

> > template
> > > > body innerHTML value of content.
> > > >
> > > > Question:
> > > >
> > > > Is there any possibility to access body through ID:
> > > >
> > > > BODYTAG.innerHTML = "<div>Hello Problem!!</div>"
> > > >
> > > > Thanks for Your reply,
> > > >
> > > >
> > > > Matjaz Zalar
> > > >
> > > >
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
S. Justin Gengo
Guest
Posts: n/a
 
      12-01-2003
Matjaz,

That's my point. Change your template so that it doesn't add the body tag.
Use a dynamic body tag on the page your template is loading into so that you
can control what you need to.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche


"Matjaz Zalar" <(E-Mail Removed)> wrote in message
news:eAs%23St%(E-Mail Removed)...
> In Your example there is <body> tag in html part of webform. Mine

page.aspx
> have NO BODY TAG or any one eather! The HTML part is loaded from database
> value first for template and then for content.
>
> Matjaz
>
>
>
> "S. Justin Gengo" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Matajaz,
> >
> > You didn't look closely enough. The code doesn't add a second body

control
> > tag. It converts the original into a server side control that can be
> > manipulated.
> >
> > --
> > Sincerely,
> >
> > S. Justin Gengo, MCP
> > Web Developer / Programmer
> >
> > Free code library at:
> > www.aboutfortunate.com
> >
> > "Out of chaos comes order."
> > Nietzche
> >
> >
> > "Matjaz Zalar" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > Thanks,
> > > but your example simply add new generic HTML control. I have already

> > specify
> > > BODY tag in template, so your approach would give me another BODY
> > > tag-control which has no relation to template BODY tag.
> > >
> > > "S. Justin Gengo" <(E-Mail Removed)> wrote in message
> > > news:(E-Mail Removed)...
> > > > Matjaz,
> > > >
> > > > Yes you can access the body tag from code-behind.
> > > >
> > > > I have sample code on my website: www.aboutfortunate.com. Just go to

> the
> > > > code library and then use the search text box there. Enter "Use body

> tag
> > > as
> > > > server control" or something similar and you'll find the sample

code.
> > > >
> > > > Any questions? Feel free to email me (Anyone).
> > > >
> > > > --
> > > > Sincerely,
> > > >
> > > > S. Justin Gengo, MCP
> > > > Web Developer / Programmer
> > > >
> > > > Free code library at:
> > > > www.aboutfortunate.com
> > > >
> > > > "Out of chaos comes order."
> > > > Nietzche
> > > >
> > > >
> > > > "Matjaz Zalar" <(E-Mail Removed)> wrote in message
> > > > news:%(E-Mail Removed)...
> > > > > Hi,
> > > > > I have following problem:
> > > > > 1. template content is stored in database string field, for

example:
> > > > >
> > > > > "<HTML><HEAD></HEAD><BODY ID="BODYTAG"></BODY></HTML>
> > > > >
> > > > > 2. page content is also stored in database:
> > > > >
> > > > > "<div>Hello Problem!!</div>"
> > > > >
> > > > > 3. page.aspx must first load template value and then inserts into
> > > template
> > > > > body innerHTML value of content.
> > > > >
> > > > > Question:
> > > > >
> > > > > Is there any possibility to access body through ID:
> > > > >
> > > > > BODYTAG.innerHTML = "<div>Hello Problem!!</div>"
> > > > >
> > > > > Thanks for Your reply,
> > > > >
> > > > >
> > > > > Matjaz Zalar
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Refer to dynamically generated objects during page load Sisilla Javascript 16 09-25-2007 03:23 PM
Emailing a dynamically generated aspx page Gary Coutts ASP .Net 3 04-23-2006 07:45 PM
How to insert dynamically generated HTML into the <body> of an ASP.NET page? Rick Spiewak ASP .Net 5 08-01-2003 12:23 PM
Dynamically generated png images Chris Jones ASP .Net 1 06-27-2003 03:00 PM
.png doesn't work for dynamically generated images, but .jpeg and .gif does Chris Jones ASP .Net 0 06-25-2003 12:47 PM



Advertisments