Usercontrol in a placeholder

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I am having this wierd issue. I have a usercontrol in a aspx page.
Basically this user control has some labels and thats it. It has a printer
friendly link and when we click on it a pop up window open with the text the
user control. Everything works good except for in hte labels, where I have
long text. When looked in teh aspx page, i see <br /> at quite some places
and somehow all of them magically disappear when on this printer friendly
page.

this is what I am doing....

PrintMessagePlaceHolder.Controls.Add(
LoadControl(GetUrl(Constants.PRINT_MESSAGE_GENERAL)));

Please let me know.

Thanks
Pradeep
 
Pradeep,

I'm quite not sure what you're asking; In the aspx page you have numerous
<br /> which work as intended in design mode? How does that fit in with the
user control, is the user control not placed correctly or what is the
problem?
 
Let me explain a bit clearly. I have a ascx control in my aspx page. Within
the ascx controls, I have multiple lables. For one of the labels I have text
which is multi-line like eg. suppose I have 3 paragraphs of text. Now when
this is displayed in the aspx page, in teh View Source I can see <br />'s at
the end of each paragraphs and/or line. But this ascx control also has a
hyperlink which actually opens a pop up window and uses the below code to put
the usercontrol in a placeholder. And now all the paragraphns of the text
about are in one paragraph. All the ohter tags are still there... like the
ones of <td> etc but dont' see any <br />s.

Let me know a solution. Or let me know what is a good way of putting a
usercontrol text into a page. Thanks in advance.

Pradeep
 
Back
Top