Incorrect HTML sent to browser

G

Guest

I have two usercontrols on the home page of my website. They are intermitently sending incorrect HTML to the browser, which results in a textbox being rendered with the wrong width. Either both controls render correctly or both are incorrect but never a mixture. When they are rendered correctly the source looks like

<input name="Header2:txtKeyword" type="text" id="Header2_txtKeyword" style="width:80px;" /

When incorrect the source looks like

<input name="Header2:txtKeyword" type="text" id="Header2_txtKeyword" /

The asp.net code in both cases is

<asp:TextBox ID="txtKeyword" Runat="server" Width="80"></asp:TextBox

Is there any reason why different HTML is being generated for the same browser on the same machine and how to ensure the width property is rendered correctly?
 
S

Saravana [MVP]

HTML rendered from the control depends upon broswer from which you are
trying to access this control. It might vary if you are trying to access it
from different browser.

--
Saravana
Microsoft MVP - ASP.NET
www.extremeexperts.com



Linda Wienholt said:
I have two usercontrols on the home page of my website. They are
intermitently sending incorrect HTML to the browser, which results in a
textbox being rendered with the wrong width. Either both controls render
correctly or both are incorrect but never a mixture. When they are rendered
correctly the source looks like:
<input name="Header2:txtKeyword" type="text" id="Header2_txtKeyword" style="width:80px;" />

When incorrect the source looks like:

<input name="Header2:txtKeyword" type="text" id="Header2_txtKeyword" />

The asp.net code in both cases is:

<asp:TextBox ID="txtKeyword" Runat="server" Width="80"></asp:TextBox>

Is there any reason why different HTML is being generated for the same
browser on the same machine and how to ensure the width property is rendered
correctly?
 
M

mikeb

Linda said:
I am trying to access the pages from the same browser IE6 on the same machine. Sometimes it works and sometimes it doesn't??

Set trace="true" in the page's @Page directive. This will dump trace
information at the end of each response.

See if the server indicates that it's getting different User-Agent
header information (or some other different infomration in the request)
when the page works and when the page doesn't work.

Maybe a proxy is filtering some information sometimes and not others for
some reason, or you're going through different proxies on different
requests, or something.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top