masterpage and control formatting (table control, HTML table control)

I have a master page that contains 1 contentplaceholder.  In my default.aspx (that uses the masterpage layout) I have a table server control.  During page_load I get the data I need and repeatedly add the usercontrol to the table control, one user control per row.  My user control is basically a HTML table with several rows and columns that's populated with data upon creation. I want this table to fill the contentplaceholder's width. In addition within the masterpage I have a CSS link for my stylesheet.

Here are my questions:

  1. Is there a better way of adding info to the contentplaceholders (CPH) instead of using table controls, or can I access the CPH directly? 
  2.  Is there a best way to control the exact size of this table server control or usercontrol's HTML table?  Do I want to stay away from inline formatting and put it all in CSS?  Currently, without inline formatting for all table elements, it's always tiny!
  3. I am unable to see my formatting in my usercotrol until I drag the stylesheet, but then I have 2 references in different areas. In addition, the formatting that I see in the usercontrol (colored text) doesn't appear when running the site.

Is there something in the order that the page is rendered that dictates the order and placement of items?

Thanks!

0
Skydiver
1/11/2006 8:06:30 PM
asp.net.navigation-controls 13714 articles. 0 followers. Follow

0 Replies
1468 Views

Similar Articles

[PageSpeed] 1
Get it on Google Play
Get it on Apple App Store

Reply:

Similar Artilces:

Convert a html table control to a Table Web Server Control
How Convert a html table control to a Table Web Server Control? add runat="server" attribute to the <table> tag...

How do I control one control from another control?
I have a page page1.aspx which is within a master page. On page I have a table with two cells. Within each cell I have placed two controls (ascx) that I have developed. Now I'd like to be able to get these two controls to interact. One needs to update the other. One has some search criteria that the other one needs to update its gridview. One needs to make the other visible/not visible at certain times. Out of the box neither control can see each other at all. Is there a good article or someplace I can find some information on how to do this?  AllAboutFocus.com. Information Technolo...

Custom Control within a Control Control
I am developing a custom controls that will render headers for different web sites. Within these controls, I want to place another custom control that will change the language. I created the language control and had it implement IPostBackDataHandler. This control works fine if I drag it on a new web form, but if I tell a header custom control to render it problems occur. The Language Selector custom control does not have a Page member anymore and the event handlers do not work. Does anyone have any experience with doing something similiar? Anyone have any suggestions? Thanks, ...

how to have both server controls and html controls rendered in a custom control?
I have a custom control in which there is an html text box.when you click on it , a div containing a table is appeared and according to what you select in that table a text is set to the text box. It works fine but the problem is: as the text box is an html element it doesn't have viewstate and when a post back occures in the page its value disappeares.I tried a hidden field to keep its value.again there is another problem : I put this custom control in a usercontrol and put the usercontrol in a multiview and by clicking on a button this view is selected and by clicking another bu...

How to configure controls within a table control?
I have a table control on wich I create some text boxes dynamically. The table's skin is the following: <asp:Table runat="server" BackColor="#F6F7F8" CaptionAlign="Left" CellPadding="2" CellSpacing="2" Font-Bold="True" Font-Names="Verdana,Arial,Helvetica,Sans-serif"Font-Size="9px" ForeColor="#666666" Width="100%"></asp:Table> The problem is that when the page is rendered the text boxes within the table are not formated. At the skin file, there's also a skin for text boxes: <asp:TextBox SkinId="TextBoxDefaultSkin" runat="server" Font-Names="Verdana,Arial,Helvetica,sans-serif...

Dynamically creating controls in a Table control
Hi I'm using a Table control to create a table in a Webform, however I need to be able to create additional controls within certain cells for instance an ImageButton where I can then build an event handler for each one I dynamically create. How do I do this, I've been trying add the control to the Controls collection of either the Page or the Table - all with poor results. Normally I'd add a control into a place holder, but again that's something that I'd need to dynamically create also in each cell I suppose...? Please help! Thanks in advance. get the HtmlTableCell e.g. H...

Controlling table tags in datalist control
Is there any way to control the table tags (for instance, adding a class to the <table...> tag and/or <td...> tags?  TIA,Owen <%-- for the <table> tag (use CssClass) --%> <asp:DataList runat="server" ID="DataList1" CssClass="yourTableClassName" ... > <%-- and for the <td> tag --%> <ItemStyle CssClass="yourRowClassName" /> </asp:DataList>  ...

Trying to load a control into a control from another control
Exactly as the subject states, I'm trying to load a control into another control from a control loaded into a page, I keep getting this error from the code I have below. I've also tried the findcontrol but it keeps coming up null. (67): 'System.Web.UI.UserControl' denotes a 'class' where a 'variable' was expected UserControl ut = ((webcontrols.BrowseItems)UserControl).LoadControl("BrowseItems"); ((webcontrols.BrowseItems)UserControl).pnl_browse_main.Controls.Add(ut); This is how we Load User controls into a content place holder. try { UserCont...

How do you control the placement of controls in a user define control
I have a user define control.  I put the control on the (C# Visual Studio 2008) page where I want them. When I run the program, the controls are all over the page.  How do I place them where they do not move form where I put them? You'll need to study the HTML output and see what it's producing, then start to look at how to do an HTML layout. hi, there are absolute and Relative position in html. I guess you must use relative position. For example, at design-time, you place a TextBox below an Image, at run-time, no matter what size is the image, the TextBox is alway bel...

Adding Controls to a Table Control in an Ajax Panel
 I have a Table server side control in an Ajax Update Panel. I want the users to be able to click a button and have a new row added with a label and a text box.  I use session state to keep track of the id of the controls being added so I can reference them. The table already has ONE text box and label in it when the user gets to the page so this is always going to be the second row of the table when the user gets to this code. The code works the first time and adds a row with the controls, but the second click of the button has the original row overwritten. What am I doing wrong??...

Cannot find control in dynamically creted table control
Hi, I am using MasterPages and in my derived pages I have a Panel control within the ContentPlaceHolder. I am dynamically creating tables and adding controls to it and then I am binding the tables to the panel control. Now I want to access the controls when an event is fired on my page. When I try acessing the controls with Table.Rows.Cells.FindControl("ControlID") it always returns null. tab.findControl("Assigned_to:") returns null    //tab is an HtmlTable tab.Rows[j].Cells[k].FindControl("Assigned_to:")  returns null However, in the watch window when I expand the ab...

getting properties of controls inside a table control
Hi, I h ave a Table control "tbl" in which I am adding other controls such as textboxes and labels dynamically. I am trying to access the propertiesof the controls, such as label1.text and textbox1.text , that I dynamically created and added into the table control. The tbl has two columns, in the first column it has labels and textboxes in the second one Is there anyway I can access the properties of all the controls that I added in different columns and rows of table control by looping through the table. Something like, string temp; for(int i-0;i<=(num...

html control and web control
Hi i am getting confused when i should use html controls and when i should use web controls. Any ideas? Cheers.I can do it! if you need any server side programability or events then user Web. If you want pure HTML then use HTML controls.... Is there anything in particular you are confused about? Here are a few things to consider:It's a tough question to answer without knowing the specifics of your application.HTML controls do not have as many features with their web server control counterparts.HTML controls could be a good idea if you were converting some existing web pages that used ...

html control and webserver control
in asp.net 1.1we  have html controls and webserver controlsFor html controls, if we set the attribute called runat="server", then will that html control turn in webserver control? then what is the use of having two different catogeries?  Putting a runat="server" in html controls will make them html server controls.  The difference between these are that you can only do client-side scripting with HTML Controls whereas with HTML server controls or webserver controls you can control them via server side or client side scripting.  HTML controls are basically not being ...

Web resources about - masterpage and control formatting (table control, HTML table control) - asp.net.navigation-controls

Chuck Norris - blksthl
... Norris doesn't set an executionpolicy for Powershell. Chuck Norris Policy is to execute everyone. Chuck Norris never uses a SharePoint Masterpage. ...

“I Saw a Nazi”
... SEE YOU IN A YEAR! 18:28 - Pictures of reconstruction groups: Kacper Gizbo (NowyEkran.pl) pictures of marching of reconstruction groups: masterpage.com.pl ...

Ajax and forms authentication
Forms authentication is nice way to protect your asp.net web pages from unauthorized views. The good thing is that it shields all request for ...

Latest Updates
Latest Updates - Free source code and tutorials for Software developers and Architects.; Updated: 15 Feb 2013

Startup Pakistan
Pakistan has a whole host of problems. So does every other country in the world. The trouble is that the name Pakistan carries an increasingly ...

Delicious
Keep, share, and discover the best of the Web using Delicious, the world's leading social bookmarking service.

Free Summary Report
Turn on more accessible mode Turn off more accessible mode Skip Ribbon Commands Skip to main content Turn off Animations Turn on Animations Contact ...

Brendan Enrick
Archive - Brendan Enrick

moredotnet
M ore d otnet .NET Interview Questions, ASP.NET, C#, VB.NET, XML, SQL Check Out http://www.dotnetUncle.com √ .NET NOTES OOPS in .NET .NET ...

Using a nested Master Page with ASP.Net
The first thing I actually missed from Webforms are nested masterpages. Fortunately they’re not missing at all, they just figured out those MVC ...

Resources last updated: 12/17/2015 2:41:46 AM