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

Multi-browser appearance problem

I'm expiriencing a basic HTML appearance problem with ASP.NET. Following a
couple of sample tags to ilustrate my problem:

<asp:TextBox id="txtWidthIssue" runat="server" Width="100"></asp:TextBox>
<asp:DropDownList id="ddlWidthIssue" runat="server"
Width="100"></asp:DropDownList>

Browser like Firefox and I'll imagine many others are not sizing correctly
the controls (.net is removing the with property during the rendering). I
tried to use STYLE="WIDTH: 100px" instead of the Width property, and is doing
the resizing fine in Firefox, but, since STYLE is not natural to the server
controls, every time I do something on the designer, .NET removes the STYLE.

This is just a basic sample, I'm having all type of problems. I was under
the impression that ASP.NET was going to render the appropriate HTML for the
browser requesting the page, if that's right how should I use that
functionality? That functionality includes my basic sample WIDTH?

I'm seriously thinking to create a web custom controls layer to add some
functionality to the basic controls, but before start on that, I'll like to
know if there is a shortcut for this problem, using the current controls.
Thanks in advance
Nov 18 '05 #1
5 1312
"Luis Fajardo" <Lu*********@discussions.microsoft.com> wrote in message
news:4E**********************************@microsof t.com...
I'm expiriencing a basic HTML appearance problem with ASP.NET. Following
a
couple of sample tags to ilustrate my problem:

<asp:TextBox id="txtWidthIssue" runat="server" Width="100"></asp:TextBox>
<asp:DropDownList id="ddlWidthIssue" runat="server"
Width="100"></asp:DropDownList>

Browser like Firefox and I'll imagine many others are not sizing correctly
the controls (.net is removing the with property during the rendering).


I can't speak to your particular issue, but you might try using a stylesheet
and then using the CssClass property on the web controls.

John Saunders
Nov 18 '05 #2
What I'm trying to specify is the WIDTH of the controls, using .css is going
to be difficult since the WIDTH is not standard for all controls.

Thanks for your comment

"John Saunders" wrote:
"Luis Fajardo" <Lu*********@discussions.microsoft.com> wrote in message
news:4E**********************************@microsof t.com...
I'm expiriencing a basic HTML appearance problem with ASP.NET. Following
a
couple of sample tags to ilustrate my problem:

<asp:TextBox id="txtWidthIssue" runat="server" Width="100"></asp:TextBox>
<asp:DropDownList id="ddlWidthIssue" runat="server"
Width="100"></asp:DropDownList>

Browser like Firefox and I'll imagine many others are not sizing correctly
the controls (.net is removing the with property during the rendering).


I can't speak to your particular issue, but you might try using a stylesheet
and then using the CssClass property on the web controls.

John Saunders

Nov 18 '05 #3
"Luis Fajardo" <Lu*********@discussions.microsoft.com> wrote in message
news:D7**********************************@microsof t.com...
What I'm trying to specify is the WIDTH of the controls, using .css is
going
to be difficult since the WIDTH is not standard for all controls.
style="width:100px" isn't standard for all controls? I didn't know that.
Which ones does it not work with?

John
"John Saunders" wrote:
"Luis Fajardo" <Lu*********@discussions.microsoft.com> wrote in message
news:4E**********************************@microsof t.com...
> I'm expiriencing a basic HTML appearance problem with ASP.NET.
> Following
> a
> couple of sample tags to ilustrate my problem:
>
> <asp:TextBox id="txtWidthIssue" runat="server"
> Width="100"></asp:TextBox>
> <asp:DropDownList id="ddlWidthIssue" runat="server"
> Width="100"></asp:DropDownList>
>
> Browser like Firefox and I'll imagine many others are not sizing
> correctly
> the controls (.net is removing the with property during the rendering).


I can't speak to your particular issue, but you might try using a
stylesheet
and then using the CssClass property on the web controls.

John Saunders

Nov 18 '05 #4
Johh, style="width: 100px" is standard, but what is happening is that if you
try to specify that to your <asp:TextBox> or <asp:DropDownList> controls the
..NET designer REMOVES the style attribute from your controls, I think,
because the style attribute is not available as part of the standard
properties for these controls.

In the other hand, if you use the Width property, in Firefox browser and I
believe that also in Netscape, the rendering process REMOVES the Width clause
on those browsers, and what happen is that you textbox and dropdownlist are
display with NO WIDTH at all, letting the browser set a default size, too
bad!!!!

Give it a try! Unless I'm smoking something :)
I think that I hear that there is a way to manipulate the RENDERING process
to avoid these problems, but I don't remember. Any ideas?
Thanks in advance,
Luis


"John Saunders" wrote:
"Luis Fajardo" <Lu*********@discussions.microsoft.com> wrote in message
news:D7**********************************@microsof t.com...
What I'm trying to specify is the WIDTH of the controls, using .css is
going
to be difficult since the WIDTH is not standard for all controls.


style="width:100px" isn't standard for all controls? I didn't know that.
Which ones does it not work with?

John
"John Saunders" wrote:
"Luis Fajardo" <Lu*********@discussions.microsoft.com> wrote in message
news:4E**********************************@microsof t.com...
> I'm expiriencing a basic HTML appearance problem with ASP.NET.
> Following
> a
> couple of sample tags to ilustrate my problem:
>
> <asp:TextBox id="txtWidthIssue" runat="server"
> Width="100"></asp:TextBox>
> <asp:DropDownList id="ddlWidthIssue" runat="server"
> Width="100"></asp:DropDownList>
>
> Browser like Firefox and I'll imagine many others are not sizing
> correctly
> the controls (.net is removing the with property during the rendering).

I can't speak to your particular issue, but you might try using a
stylesheet
and then using the CssClass property on the web controls.

John Saunders


Nov 18 '05 #5
"Luis Fajardo" <Lu*********@discussions.microsoft.com> wrote in message
news:55**********************************@microsof t.com...
Johh, style="width: 100px" is standard, but what is happening is that if
you
try to specify that to your <asp:TextBox> or <asp:DropDownList> controls
the
.NET designer REMOVES the style attribute from your controls, I think,
because the style attribute is not available as part of the standard
properties for these controls.


I said that you should try creating a stylesheet and referring to the
classes in the stylesheet with the CssClass attribute on the web controls.
That will not be removed.

John
Nov 18 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

37
by: ajikoe | last post by:
Hello, Is anyone has experiance in running python code to run multi thread parallel in multi processor. Is it possible ? Can python manage which cpu shoud do every thread? Sincerely Yours,...
12
by: * ProteanThread * | last post by:
but depends upon the clique: ...
6
by: cody | last post by:
What are multi file assemblies good for? What are the advantages of using multiple assemblies (A.DLL+B.DLL) vs. a single multi file assembly (A.DLL+A.NETMODULE)?
6
by: Joe | last post by:
I have 2 multi-list boxes, 1 displays course categories based on a table called CATEGORIES. This table has 2 fields CATEGORY_ID, CATEGORY_NAME The other multi-list box displays courses based on...
5
by: bobwansink | last post by:
Hi, I'm relatively new to programming and I would like to create a C++ multi user program. It's for a project for school. This means I will have to write a paper about the theory too. Does anyone...
17
by: =?Utf-8?B?R2Vvcmdl?= | last post by:
Hello everyone, Wide character and multi-byte character are two popular encoding schemes on Windows. And wide character is using unicode encoding scheme. But each time I feel confused when...
0
by: Sabri.Pllana | last post by:
We apologize if you receive multiple copies of this call for papers. *********************************************************************** 2008 International Workshop on Multi-Core Computing...
1
by: mknoll217 | last post by:
I am recieving this error from my code: The multi-part identifier "PAR.UniqueID" could not be bound. The multi-part identifier "Salary.UniqueID" could not be bound. The multi-part identifier...
2
by: Aussie Rules | last post by:
Hi, I have a site that Iwant to either display my text in english or french, based on the users prefernces ? I am new to webforms, but I know in winforms, this is pretty easy with a resource...
14
by: =?ISO-8859-1?Q?Tom=E1s_=D3_h=C9ilidhe?= | last post by:
As far as I know, the C Standard has no mention of multi-threaded programming; it has no mention of how to achieve multi-threaded programming, nor does it mention whether the language or its...
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:
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.