Putting Dynamic Text Where I Want It

R

Rehor

I'm just starting with ASP.NET and C#.

On one of my web forms I created has a dropdown list of choices. Once a
choice is made, the postbacked page displays a list of links to
documents in an unordered list using Response.Write in the codebehind
page. It works very well except ... the unordered list appears at the
top of the postbacked page with the header user control and the
dropdown box at the bottom of the page after the unordered list. Also,
my page isn't displaying according to the CSS as it does before
postback.

I tried using grid layout, but this interferes with my footer user
control at the bottom of the page.

I Googled around and searched ASP.NET and other ASP web sites looking
to see if a placeholder would help me out, but I couldn't see where
placeholder could be used in this manner.
I'd appreciate any advice or points in the right direction.

TIA
 
S

Scott Mitchell [MVP]

Rehor said:
On one of my web forms I created has a dropdown list of choices. Once a
choice is made, the postbacked page displays a list of links to
documents in an unordered list using Response.Write in the codebehind
page. It works very well except ... the unordered list appears at the
top of the postbacked page with the header user control and the
dropdown box at the bottom of the page after the unordered list. Also,
my page isn't displaying according to the CSS as it does before
postback.

Drop a Label control on the page where you want. Then, in your
code-behind, set the Label's Text property to the output you are
currently displaying via Response.Write().

While Response.Write was your friend in classic ASP, you'll find that
with ASP.NET you virtually *never* use Response.Write() anymore.

hth

--

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

* When you think ASP.NET, 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,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top