473,624 Members | 2,394 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to set width for a place holder

J-T
I am constructing an HTML text which I need to render in my ASP.NET page.
string rssOutput = Posts.listPosts (Constants.Webl ogSectionID);

rssOutput contains html code and text.Then I create a literal control as
follow:

LiteralControl lit = new LiteralControl( rssOutput);

lit.Text = lit.Text.Replac e("&lt;","<") ;

lit.Text = lit.Text.Replac e("&gt;",">") ;

lit.Text = lit.Text.Replac e("&amp;","&" );

and I add that control to a place holder called "phOutput".

this.phOutput.C ontrols.Add(lit );

I have no problem rendering the HTML inside the place holder and it works
fine,my only problem is I don;t know how to control the width of my place
holder.It seems that I cannot increase it programmaticall y or at design
time.

Any suggestions?

Thanks
Nov 21 '05 #1
2 3024
J-T
I guess I found the problem,

I was rendering a table in my HTML section and its width was set to 10%
instead of 100%.

"J-T" <Re**@Reza.Co m> wrote in message
news:Os******** ********@TK2MSF TNGP12.phx.gbl. ..
I am constructing an HTML text which I need to render in my ASP.NET page.
string rssOutput = Posts.listPosts (Constants.Webl ogSectionID);

rssOutput contains html code and text.Then I create a literal control as
follow:

LiteralControl lit = new LiteralControl( rssOutput);

lit.Text = lit.Text.Replac e("&lt;","<") ;

lit.Text = lit.Text.Replac e("&gt;",">") ;

lit.Text = lit.Text.Replac e("&amp;","&" );

and I add that control to a place holder called "phOutput".

this.phOutput.C ontrols.Add(lit );

I have no problem rendering the HTML inside the place holder and it works
fine,my only problem is I don;t know how to control the width of my place
holder.It seems that I cannot increase it programmaticall y or at design
time.

Any suggestions?

Thanks

Nov 21 '05 #2
A placeholder does not have width or height. It is simply a way to tag a
location within a page. Try wrapping your litterals inside a table and givce
the cell the required width:

<table><tr><t d width=100px>you r text</td></tr></table>

--
Andrew Robinson
www.binaryocean.com
www.bellinghamdotnet.org
"J-T" <Re**@Reza.Co m> wrote in message
news:Os******** ********@TK2MSF TNGP12.phx.gbl. ..
I am constructing an HTML text which I need to render in my ASP.NET page.
string rssOutput = Posts.listPosts (Constants.Webl ogSectionID);

rssOutput contains html code and text.Then I create a literal control as
follow:

LiteralControl lit = new LiteralControl( rssOutput);

lit.Text = lit.Text.Replac e("&lt;","<") ;

lit.Text = lit.Text.Replac e("&gt;",">") ;

lit.Text = lit.Text.Replac e("&amp;","&" );

and I add that control to a place holder called "phOutput".

this.phOutput.C ontrols.Add(lit );

I have no problem rendering the HTML inside the place holder and it works
fine,my only problem is I don;t know how to control the width of my place
holder.It seems that I cannot increase it programmaticall y or at design
time.

Any suggestions?

Thanks

Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1830
by: vitaly.tomilov | last post by:
I'm using an ASP.NET form to display data from my database table, and I'm doing it in the following way: XmlDataDocument doc = new XmlDataDocument(mydataSet); XPathNavigator nav = doc.CreateNavigator(); XslTransform xslTran = new XslTransform(); xslTran.Load("Transform.XSL"); xslTran.Transform(nav, null, Response.Output, null); This produces me a nice HTML page with enhanced formatting specified
5
10877
by: andchoi | last post by:
I must be the dumbest ASP.NET 2.0 developer, because despite many different attempts, I am unable to resize a content place holder in the master page... Can anyone clue me in? It seems that the "resize grip handle" won't move despite I try pulling, pushing, kicking, punching, screaming. What am I missing here?
50
6039
by: Shadow Lynx | last post by:
Consider this simple HTML: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 STRICT//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head> <title>Strict kills my widths!</title> </head> <body> <table style="width:400px; table-layout:fixed;">
0
1145
by: MasterChief | last post by:
I have a content place holder that is showing the summary of a sale. Is there a way to create a button in the content place holder that the person can click on to print just what is in the content place holder?
1
4820
by: lamuerte451 | last post by:
Hi: I am a newbie to asp.net 2.0 and am building an app with VS 2005 that will allow users to update records via the web. I have created a master page and then have placed Gridview and details view on the corresponding pages that the users will add records to. I am using a sql data source. My question is, how do I set the web page (content place holder) to automatically expand/resize to accommadate the addition of new records. ...
1
2081
by: namewitheldbyrequest | last post by:
When I create a web form in VS 2005 I have a problem. I created a MasterPage with a ContentPlaceHolder object on it. Then I created a detail page that refrenced the Master Page. When I drag controls onto the ControlPlaceHolder on the Detail page, the controls end up at the upper left corner of the page and I have to drag them down onto the ControlPlaceHolder. The controls are coded in the HTML as position = absolute and I don't think...
0
1924
by: arunpillai | last post by:
hi guys, My problem is i need to display different html page in content place holder just like how we will be doing in the frames. I have a menu control when ever the menu is clicked the particular page shuold be displayed in the content palce holder
4
3980
by: Rene | last post by:
I have a master page where I would like to be able to resize the width of the ContentPlaceHolder. Once the Content Place Holder control has the with that I want, I don't want it to change even if the browser is resized. Is it possible to accomplish this?
3
2818
malav123
by: malav123 | last post by:
Hi, I am using ajax tabcontainer in my project, i have master page in which there is left pannel,right panel,header,footer and content place holder... my content place holder's width is 900px so i want my tabcontainer with the same width.. but when i gives 800 above width the right side of tabcontainer gets cut... so max width is 800px ??? please reply it's urgent.... -malav.
0
8240
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
8336
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8482
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7168
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6111
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5565
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4082
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4177
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2610
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.