Sending output via a user control

E

Eric Caron

Ok, newbie question here: I want to display a dynamic menu using
Response.Write statements in a user control, but the output comes out
at the top of the rendered page instead of where the user control is
located on the page. Is there a way around this?

TIA.

Éric
 
S

Scott Mitchell [MVP]

Eric said:
Ok, newbie question here: I want to display a dynamic menu using
Response.Write statements in a user control, but the output comes out
at the top of the rendered page instead of where the user control is
located on the page. Is there a way around this?

Generate the HTML output in a string (or better yet, using a
StringBuilder), and then squirt the output to the Text property of a
Literal control that is strategically placed on the page precisely where
you want the HTML emitted...

--

Scott Mitchell
(e-mail address removed)
http://www.4GuysFromRolla.com
http://www.ASPFAQs.com
http://www.ASPMessageboard.com

* When you think ASP, think 4GuysFromRolla.com!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top