3 Replies - 3223 Views - Last Post: 16 January 2014 - 10:49 PM Rate Topic: -----

#1 albert018  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 22
  • Joined: 07-January 13

Control's Property doesn't render in IE10 or later version.

Posted 16 January 2014 - 07:13 PM

The following is a simple segment of html.

<asp:Label id="lblName" Width="300px" Runat="server"></asp:Label>


Normally the *.aspx would be rendered as following

<span id="lblName" style="300px;"></span>


In Ie9 or earlier version I got the right HTML.

But in Ie10 or later version , the 「300px」 just doesn't render anymore.

Unless I set the 「Compatibility View」 in Ie11.

Another example is :

<asp:panel id="Panel1" runat="server" BackImageUrl="img/sample.jpg"></asp:panel>


The property 「BackImageUrl」 should be rendered as

<code><div id="Panel1" style="background-image:url(img/sample.jpg);"></div></code>

Does anyone get this problem as well ? Is any suggestion about it ?

This post has been edited by albert018: 16 January 2014 - 07:20 PM


Is This A Good Question/Topic? 0
  • +

Replies To: Control's Property doesn't render in IE10 or later version.

#2 andrewsw  Icon User is online

  • Fire giant boob nipple gun!
  • member icon

Reputation: 3371
  • View blog
  • Posts: 11,420
  • Joined: 12-December 12

Re: Control's Property doesn't render in IE10 or later version.

Posted 16 January 2014 - 07:23 PM

The correct rendering should be:
<span id="lblName" style="width: 300px;"></span>

but what does it show as when you view the source of the page in IE10 (or 11)?

Does the document have a valid DOCTYPE declaration as its first line? Without it, IE drops into quirks mode.

Mind you.. neither your Label or Panel have any content, but perhaps you just haven't posted them here with the content.
Was This Post Helpful? 0
  • +
  • -

#3 albert018  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 22
  • Joined: 07-January 13

Re: Control's Property doesn't render in IE10 or later version.

Posted 16 January 2014 - 07:36 PM

View Postandrewsw, on 16 January 2014 - 07:23 PM, said:

The correct rendering should be:
<span id="lblName" style="width: 300px;"></span>

.........


What I view in IE10/IE11 is

<span id="lblName"></span>


Actually I've tried out a way that it does work.

It is to set the property in the sytle attrubute at first,just like

<asp:Label id="lblName" runat="server" style="width:300px;"></asp:Label>


But I still wonder how the situation happen.

By the way , I did set <!DOCTYPE HTML> at first line , does it count as the HTML declaration?
Was This Post Helpful? 0
  • +
  • -

#4 andrewsw  Icon User is online

  • Fire giant boob nipple gun!
  • member icon

Reputation: 3371
  • View blog
  • Posts: 11,420
  • Joined: 12-December 12

Re: Control's Property doesn't render in IE10 or later version.

Posted 16 January 2014 - 10:49 PM

Quote

By the way , I did set <!DOCTYPE HTML> at first line , does it count as the HTML declaration?

That is the DOCTYPE declaration, the html-tag follows that:

<!DOCTYPE HTML>
<html>
<head>
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1