home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Ask a Tech Support Question (free)!

Table Width (ASP.NET) in firefox

Reply
Get bargains at  »  Dealighted.com
 
Thread Tools Search this Thread
Currently Active Users: 2217
Discussions: 200,944, Posts: 2,379,348, Members: 246,306
Old July 22nd, 2006, 12:58 PM   Digg it!   #1 (permalink)
Member
 
Join Date: Oct 2003
Posts: 263
Table Width (ASP.NET) in firefox

Hey Everyone,

Having a little trouble with this...It works in IE fine but in Firefox not so well.

Basically I am getting a dataset from an XML file then using a server side table to dymnically create the table with textbox's so the user can modify the data.

Basically I am trying to set the width of the textbox

newTextBox.Width = System.Web.UI.WebControls.Unit.Pixel(500)

In firefox it just doesn't even attempt to modify the width of the textbox

In IE the source code ends up:

<input name="_ctl0" type="text" value="Date: 4/16/06 -- Removed all late binding in favor of early binding to improve speed performance. All logic was added to session variable returns. (Version updated to 1.2)" style="width:500px;" />


In firefox:
<input name="_ctl0" type="text" value="Date: 4/16/06 -- Removed all late binding in favor of early binding to improve speed performance. All logic was added to session variable returns. (Version updated to 1.2)" />


Here is the code in ASP.NET - vb


Dim i As Int32
Dim newTableCell As TableCell
Dim newTableRow As TableRow
Dim dsXMLFile As New DataSet
Dim newChkBox As CheckBox
Dim newTextBox As TextBox

dsXMLFile = CType(Session("adminXMLNewsDataSet"), DataSet)

For i = 0 To dsXMLFile.Tables(0).Rows.Count - 1
newTableRow = New TableRow
newTableCell = New TableCell
newChkBox = New CheckBox
newTextBox = New TextBox

newTableRow.Width = System.Web.UI.WebControls.Unit.Percentage(90)
newTextBox.Width = System.Web.UI.WebControls.Unit.Pixel(500)
newTextBox.Text = CType(dsXMLFile.Tables(0).Rows(i).Item(1), String)
newTableCell.Controls.Add(newTextBox)
newTableRow.Cells.Add(newTableCell)
tblNews.Rows.Add(newTableRow)
Next


Anyone have any idea's. I havent tried using CSS to use for the table property's yet.

Thanks for yoru help in advance
amtrac24 is offline   Reply With Quote
Old July 22nd, 2006, 01:00 PM     #2 (permalink)
Member
 
Join Date: Oct 2003
Posts: 263
Also just a note...I basically created the same thign in a datagrid with the same results. So something is going on with firefox...i just need to figure a workaround...
amtrac24 is offline   Reply With Quote
Old July 22nd, 2006, 05:44 PM     #3 (permalink)
Real gangstas sip on Yacc
 
jkrohn's Avatar
 
Join Date: Oct 2001
Location: Suckas-ville
Posts: 4,552
Send a message via ICQ to jkrohn Send a message via AIM to jkrohn Send a message via Yahoo to jkrohn
That is not a firefox problem, that is an IIS problem. It is detecting the browser and sending it different code. Firefox isn't changing the code it receives.

Jkrohn
__________________
Signatures blow hard
If your signature contains an ad of any kind, congratulations, you're on my ignore list.
jkrohn is offline   Reply With Quote
Old July 22nd, 2006, 07:37 PM     #4 (permalink)
Member
 
Join Date: Oct 2003
Posts: 263
I def see your point. We had the same issue with regular ASP project. We updated the browscap.ini file. Do JKrohn do you know how ASP.NET deals with this? Is it with the browscap.ini file?
amtrac24 is offline   Reply With Quote
Old July 22nd, 2006, 08:30 PM     #5 (permalink)
Member
 
Join Date: Oct 2003
Posts: 263
Yeah you are right... When I run
Dim s As String = ""
With Request.Browser
s &= "Browser Capabilities" & vbCrLf
s &= "Type = " & .Type & vbCrLf
s &= "Name = " & .Browser & vbCrLf
s &= "Version = " & .Version & vbCrLf
s &= "Major Version = " & .MajorVersion & vbCrLf
s &= "Minor Version = " & .MinorVersion & vbCrLf
s &= "Platform = " & .Platform & vbCrLf
s &= "Is Beta = " & .Beta & vbCrLf
s &= "Is Crawler = " & .Crawler & vbCrLf
s &= "Is AOL = " & .AOL & vbCrLf
s &= "Is Win16 = " & .Win16 & vbCrLf
s &= "Is Win32 = " & .Win32 & vbCrLf
s &= "Supports Frames = " & .Frames & vbCrLf
s &= "Supports Tables = " & .Tables & vbCrLf
s &= "Supports Cookies = " & .Cookies & vbCrLf
s &= "Supports VBScript = " & .VBScript & vbCrLf
s &= "Supports JavaScript = " & _
.EcmaScriptVersion.ToString() & vbCrLf
s &= "Supports Java Applets = " & .JavaApplets & vbCrLf
s &= "Supports ActiveX Controls = " & .ActiveXControls & _
vbCrLf
End With
TextBox1.Text = s


It basically just craps out and returns browser cabilities and thats it...when i run it in IE it gives me all the IE info.....

So I researched online about changing the settings on my .net machineconfig file but couldn't really find anything that I understood. Have you modified that file before?

Any help would be appreciated...
amtrac24 is offline   Reply With Quote
Old July 22nd, 2006, 08:42 PM     #6 (permalink)
Member
 
Join Date: Oct 2003
Posts: 263
jkrohn...I got it...I think i just got fustrated.... just had to add the following lines to machine.config....Thank you for your help...I so thought the problem was code based. Thank you again for your help. I really appreciate it.

<!-- GECKO Based Browsers (Netscape 6+, Mozilla/Firefox, ...) //-->
<case match="^Mozilla/5\.0 \([^)]*\) (Gecko/[-\d]+)(?'VendorProductToken' (?'type'[^/\d]*)([\d]*)/(?'version'(?'major'\d+)(?'minor'\.\d+)(?'letters' \w*)))?">
browser=Gecko
<filter>
<case match="(Gecko/[-\d]+)(?'VendorProductToken' (?'type'[^/\d]*)([\d]*)/(?'version'(?'major'\d+)(?'minor'\.\d+)(?'letters' \w*)))">
type=${type}
</case>
<case> <!-- plain Mozilla if no VendorProductToken found -->
type=Mozilla
</case>
</filter>
frames=true
tables=true
cookies=true
javascript=true
javaapplets=true
ecmascriptversion=1.5
w3cdomversion=1.0
css1=true
css2=true
xml=true
tagwriter=System.Web.UI.HtmlTextWriter
<case match="rv?'version'(?'major'\d+)(?'minor'\.\d+)( ?'letters'\w*))">
version=${version}
majorversion=0${major}
minorversion=0${minor}
<case match="^b" with="${letters}">
beta=true
</case>
</case>
</case>
amtrac24 is offline   Reply With Quote
Old July 23rd, 2006, 01:52 AM     #7 (permalink)
Real gangstas sip on Yacc
 
jkrohn's Avatar
 
Join Date: Oct 2001
Location: Suckas-ville
Posts: 4,552
Send a message via ICQ to jkrohn Send a message via AIM to jkrohn Send a message via Yahoo to jkrohn
Glad you got it (was out all day).

ASP.Net and IIS can be fun like that at times

Jkrohn
jkrohn is offline   Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar Threads
Thread Thread Starter Forum Replies Last Post
Making the switch from ASP to ASP.NET omalleytrading Webmastering and Programming 6 October 15th, 2008 03:12 PM
Asp.net knoxville General Tech Discussion 1 August 15th, 2004 12:47 PM
Defaulting to Zero in ASP.NET Tekk Webmastering and Programming 6 May 2nd, 2004 07:48 PM
ASP.NET ? nhatnam Webmastering and Programming 10 April 22nd, 2003 09:56 AM


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Most Active Discussions
Making Health Care Worse (163)
The disrespect of Obama by Russian .. (17)
Is It Just Me? (2921)
Wireless Televisions. (11)
windows 7 problem (7)
CPU fan stops spinning randomly (8)
Regular Build (6)
Is the PSU I received dead? (11)
Print spooler problem (15)
HIS HD5770 graphic card question (15)
windows vista security holes (9)
Install XP pro and a Vista laptop ?.. (11)
Foreign voltage (10)
Dept. of HS: NSA 'Helped' Develop V.. (15)
Recent Discussions
How to convert MP3's (2)
windows 7 internet problem (5)
Multiple Restarts Required at Boot (0)
BSOD On Startup (ntoskrnl.exe) (2)
Print spooler problem (15)
Laptop with wireless problem. (1)
Wireless Televisions. (11)
Have you switched yet? (86)
Asus P4G8X Mobo (5)
screen resolution vs monitor size (2)
radeon x850xt platinum & shader 3 (4)
sms storage to PC (0)
Regular Build (6)
Open With ..... Win7 (0)
java code for fibonacci (1)
[F@H SPAM 11/16/09] ! 1/2 months to r.. (35)
windows 7 problem (7)
CPU fan stops spinning randomly (8)
Partition Magic caused HDD problem (3)
Is the PSU I received dead? (11)
Point and Shoot Camera Suggestions. (2)
Modern Warfare 2 freeze (13)
wireless user (1)
World's largest Monopoly Game using G.. (332)
Ideal cheap graph card for PC-Gaming? (17)


All times are GMT -4. The time now is 06:37 PM.
TechIMO Copyright 2009 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28