473,395 Members | 1,675 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,395 software developers and data experts.

Formatting Hyperlink in C#

1
Hi,

I have dynamically created some Hyperlinks, and now I need to format its font and put it in a table. How can I use the control that's been created? (hl)
I tried setting hl.Font or putting hl directly into a table.


Here is my Code:
HyperLink hl = new HyperLink();

System.Text.StringBuilder sb = new System.Text.StringBuilder();
sb.Insert(0, "  ", lvl);


hl.NavigateUrl = dataRow["APPLICATION_LOCATION"].ToString(); //URL direction
hl.Text = sb.ToString() + dataRow["APPLICATION_DISPLAY_NAME"].ToString() + "<br>"; //display text
hl.Text = FontFamily.GenericSansSerif;
this.Controls.Add(hl);
Feb 9 '07 #1
0 884

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

Similar topics

2
by: Miki Szinegh | last post by:
Hello All, I have an asp.net search application that brings up a datagrid of results, with one of the fields being a hyperlink to an XML document, of which there are thousands. By clicking this...
2
by: Gerry Abbott | last post by:
Hi All. Im combining the values in a couple of fields to an alias field in a query to make valid web, http addresses. However I wish to bind this field to a text box and format the text box to...
0
by: Alex | last post by:
I have a dataset bound datagrid. I added my own columns (autogenerate=false). However I can't figure out how to display a hyperlink string coming from the DB as a functioning hyperlink. What can...
2
by: Lerp | last post by:
Hi all, I have several template columns in my datagrid, is there an attribute that sets the fore color for the text in these buttons...I would like them to be black instead of the default link...
2
by: Moe Sizlak | last post by:
Hi There, I am wanting to format a datalist into columns, so do I need to use a table rows & columns? or can I use templates and a property at the top of the list itself ? It seems that when I...
3
by: chuckdfoster | last post by:
I have a hyperlink column in my datagrid. I want my hyperlink to be green or red (depending on in/out status) no matter if the link has been visited or not. How can I accomplish this? I have...
5
by: Stephen | last post by:
Hi, Is there anyway I can make a column thats databound into a hyperlink to navigate to another page? Suppose I have 3 columns: SortOrder, Description, UserName for eg: <Columns>...
2
by: Casey | last post by:
Hi! I'm making a webpage where it will list all the printers in their area, with the UNC path to the printer. It would be like: \\someserver\aprinter The only problem is, if I type that path...
1
by: SAL | last post by:
Hello, I am sending an e-mail message from my ASP.NET 2.0 application. The body of the message is coming from a database and formatting has already been applied to the text. My problem is that if...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...

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.