Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx thread: Adding linebreaks to HtmlContainerControls after using Controls.A dd


Message #1 by "Oliver, Wells" <WOliver@l...> on Thu, 21 Nov 2002 11:05:53 -0800
I have this:

this.RelatedItemMessage.InnerHtml = "<p>Please type a web part number to
search on:</p>";
TextBox objBox = new TextBox();
Button objButton = new Button();
objBox.Width = 150;
objButton.Text = "Search";
this.RelatedItemMessage.Controls.Add (objBox);
this.RelatedItemMessage.Controls.Add (objButton);

However, this puts the button right next to the textbox, and I'd like to be
on the next line. After doing Controls.Add I also cannot add to the
InnerHtml property of the HtmlContainerControl because it's no longer
literal.

Any tips?

Wells Oliver
Web Applications Programmer
Leviton Voice & Data
xxx-xxx-xxxx
http://www.levitonvoicedata.com 

Message #2 by "Dave Rezoski" <daverezoski@h...> on Thu, 21 Nov 2002 22:01:58 +0000
are you saying that this does not work?

this.RelatedItemMessage.Controls.Add (objBox);
this.RelatedItemMessageControls.Add(new LiteralControl("<br>"));
this.RelatedItemMessage.Controls.Add (objButton);







----Original Message Follows----
From: "Oliver, Wells" <WOliver@l...>
Reply-To: "ASP.NET" <aspx@p...>
To: "ASP.NET" <aspx@p...>
Subject: [aspx] Adding linebreaks to HtmlContainerControls after using 
Controls.A     dd
Date: Thu, 21 Nov 2002 11:05:53 -0800

I have this:

this.RelatedItemMessage.InnerHtml = "<p>Please type a web part number to
search on:</p>";
TextBox objBox = new TextBox();
Button objButton = new Button();
objBox.Width = 150;
objButton.Text = "Search";
this.RelatedItemMessage.Controls.Add (objBox);
this.RelatedItemMessage.Controls.Add (objButton);

However, this puts the button right next to the textbox, and I'd like to be
on the next line. After doing Controls.Add I also cannot add to the
InnerHtml property of the HtmlContainerControl because it's no longer
literal.

Any tips?

Wells Oliver
Web Applications Programmer
Leviton Voice & Data
xxx-xxx-xxxx
http://www.levitonvoicedata.com




_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail

Message #3 by "Oliver, Wells" <WOliver@l...> on Fri, 22 Nov 2002 09:17:50 -0800
Oh, cool. I didn't know there was a LiteralControl controls. Thanks!

-----Original Message-----
From: Dave Rezoski [mailto:daverezoski@h...] 
Sent: Thursday, November 21, 2002 2:02 PM
To: ASP.NET
Subject: [aspx] Re: Adding linebreaks to HtmlContainerControls after using
Controls.A dd


are you saying that this does not work?

this.RelatedItemMessage.Controls.Add (objBox);
this.RelatedItemMessageControls.Add(new LiteralControl("<br>"));
this.RelatedItemMessage.Controls.Add (objButton);







----Original Message Follows----
From: "Oliver, Wells" <WOliver@l...>
Reply-To: "ASP.NET" <aspx@p...>
To: "ASP.NET" <aspx@p...>
Subject: [aspx] Adding linebreaks to HtmlContainerControls after using 
Controls.A     dd
Date: Thu, 21 Nov 2002 11:05:53 -0800

I have this:

this.RelatedItemMessage.InnerHtml = "<p>Please type a web part number to
search on:</p>"; TextBox objBox = new TextBox(); Button objButton = new
Button(); objBox.Width = 150; objButton.Text = "Search";
this.RelatedItemMessage.Controls.Add (objBox);
this.RelatedItemMessage.Controls.Add (objButton);

However, this puts the button right next to the textbox, and I'd like to be
on the next line. After doing Controls.Add I also cannot add to the
InnerHtml property of the HtmlContainerControl because it's no longer
literal.

Any tips?

Wells Oliver
Web Applications Programmer
Leviton Voice & Data
xxx-xxx-xxxx
http://www.levitonvoicedata.com


---
Change your mail options at http://p2p.wrox.com/manager.asp or to
unsubscribe send a blank email to 


_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail




  Return to Index