Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.1
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 28th, 2004, 03:58 PM
Registered User
 
Join Date: Dec 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default setting a font in a repeater ItemTemplate

Greetings,
I am displaying the results of a scan request in a repeater. Preserving file name white space is critical so I surrounded it with the <pre> tag. This changed the font of the text. How do I define a desired font for the file name text? The tag inside or outside the <pre> had no effect.
The code:

<ItemTemplate>
 <tr>
  <td>
   <pre><%# DataBinder.Eval(Container.DataItem, "szFilename") %></pre>
  </td>
 </tr>
</ItemTemplate>

Thanks,
Mike Stevens
 
Old December 28th, 2004, 05:16 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi Mike ,

Try a style attribute on the <pre> tag, like this:

<pre style="font-family:Arial;font-weight:bold;">

Although a non mono-spaced font may defeat the purpose of the <pre> tag.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old December 28th, 2004, 06:02 PM
Registered User
 
Join Date: Dec 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Bingo. Thanks so much Imar.
Gratefully,
Mike






Similar Threads
Thread Thread Starter Forum Replies Last Post
GridView Checkbox ItemTemplate angelicagm ASP.NET 2.0 Professional 3 May 31st, 2007 04:44 AM
error setting ItemTemplate asp:DataGrid jackiew General .NET 3 April 10th, 2006 02:59 PM
how to get font ,color,font size of text in win32 satishsatao Visual C++ 0 April 5th, 2006 05:05 AM
How to Use ItemTemplate Editor wirerider ASP.NET 2.0 Basics 0 February 18th, 2006 02:59 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.