473,383 Members | 1,859 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Setting text to bold in Table heading

132 100+
Hi there.

I am dynamically creating a table within my ASP.Net (C#) page and adding this to an ASP Panel, using the command
Expand|Select|Wrap|Line Numbers
  1. PanelBlocksSecurity.Controls.Add(dTable);
  2.  
I can get everything working correctly but my table headings are in normal case, whereas I would like them in bold font.

An example of one of my commands to add a header column is as follows:
Expand|Select|Wrap|Line Numbers
  1. HtmlTableCell headerCell2 = new HtmlTableCell();
  2. headerCell2.InnerText = "Select"; 
  3. headerRow.Controls.Add(headerCell2);
  4.  
The question hence is how do I set the text "Select" above so that it is bold please? I have a feeling this is very easy to do but for some reason it is not registering in my brain at the moment..!

Thank you.

Mark :o)
Mar 25 '09 #1
2 6706
Frinavale
9,735 Expert Mod 8TB
You could use the style property of the HtmlTableCell to set the style to bold:
Expand|Select|Wrap|Line Numbers
  1. headerCell2.Style.Add("font-weight","bold");
Mar 25 '09 #2
E11esar
132 100+
Thank you for that. Looks so easy now when you see the answer.

M :o)
Mar 26 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: johngilmer | last post by:
I have three radio buttons that are possible answers to a question. I have put them in a table and there is a label that goes with each radio button as its text. I would like to make some of the...
7
by: hawat.thufir | last post by:
Given an xhtml file, how can I "export" the data to plain-text? That is, I want: google www.google.com Whereas, if I copy and paste what the browser shows, I lose the URL and end up with:...
2
by: Charleees | last post by:
Hi all, I have a DataGrid with Template Columns..... There are LAbels,Linkbuttons in the Single Row.. I have to set the Constant Column width for those Template Columns in Grid... Wat...
5
by: Christophe | last post by:
Hello, I try to align the baseline of my title with a white line using CSS. The code does work with Safari Mac, Explorer Mac and PC, Firefox PC. But on Firefox 1.5 Mac and Opera 6.03, the text...
1
by: Darsin | last post by:
What i am doing is to pull the data from a CMS and import it to Word 2007 Beta and i also have to export the data from Word 2007 Beta back to that CMS. We have with us two Web Services of the CMS....
13
by: =?Utf-8?B?S2VzdGZpZWxk?= | last post by:
Hi Our company has a .Net web service that, when called via asp.net web pages across our network works 100%! The problem is that when we try and call the web service from a remote machine, one...
7
eragon
by: eragon | last post by:
i have a script that will write to a text file from a form... using php scripts.. now i need a script to call from this file line by line, or any similar way of posting it, and insert it into my php...
4
by: pablorp80 | last post by:
Hello, Here is what I need: I need the focus and the cursor set to a textbox named txtGT, every time no matter if it is the first page load or whether it is a postback. Here is the problem: I...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...

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.