Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
| Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics 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
  #1 (permalink)  
Old May 24th, 2006, 04:09 AM
Registered User
 
Join Date: May 2006
Location: Copenhagen, , Denmark.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default DataGrid renders different on different machines

Hi - sorry for any crosspost, I'm new and in doubt as to where this question should be posted..

I'm working on a .NET application and has run into an annoying problem.

I have a report, that consists of a DataGrid, wher I have disabled the AutoGenerateColumns, as I'm binding the columns myself.

I have turned on nowrap on "Header" and "Item", and is explicit setting width (bcol.ItemStyle.Width = Unit.Pixel(270); )

the problem is, that on my own machine and the "production"-server, the HTML renders differently, so the "<table>" does not respect the width I have set.

This is the data for the 2 machines:

mine:
XP Professional version 2002 sp2
MSIE 6.0.2900.2180.xpsp_sp2_gdr.050301-1519
ASP .Net (v2.0.50727).

the other:
XP Professional version 2002 sp2
MSIE 6.0.2900.2180.xpsp_sp2_gdr.050301-1519
ASP .Net (v2.0.50727).

regardless of the "identicality" of the two machines, the resulting HTML is as follows:

my machine:
...
<table>
<tr>
   <td nowrap="nowrap" align="left" style="font-weight:bold;width:270px;"></td>
</tr>
</table>
...

and the other:
...
<table>
<tr>
   <td align="left" style="font-weight:bold;width:270px;white-space:nowrap;"></td>
</tr>
</table>
...

Note, that the "nowrap" is different. As far as I can tell, the style-attribute on the "other" machine is invalidating the <td>-tag, and thus the table does not respect the "width"-setting.

Can anyone explain why this is? Where is the difference between the two machines? And even better - how can I get the other machine to render the HTML like my own machine?

Thanks in advance


  #2 (permalink)  
Old June 19th, 2007, 03:34 PM
Registered User
 
Join Date: Jun 2007
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am also having this same problem, and this is about the only place I have been able to find which describes my problem.
I see no explanation as to why this may happen.
Can anyone explain this?



Similar Threads
Thread Thread Starter Forum Replies Last Post
Working with the book on two machines... Bruce.Wiki BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 5 October 30th, 2008 11:53 AM
Insert renders error snufse SQL Language 2 October 13th, 2008 09:28 PM
DataGrid renders different on different machines GertFrost ASP.NET 2.0 Professional 1 May 25th, 2006 10:21 PM
dw renders my css when previewed in browser? jakewilliamson Dreamweaver (all versions) 5 March 21st, 2005 05:42 AM





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