N
news.iq.ca
Hello,
I am learning ASP.net (for the moment, I'm still writing the code by hand,
in Notepad - VS.NET can wait for now).
The original text code is this:
--------------------------------------------------------------------------------------------------
<p>
<asp:label id="lbl1" text="Unbound, with ListItem." runat="Server"/>
<p>
<asp:listbox id="lstBox1" onselectedindexchanged="listbox_Changed"
width="200" backcolor="Red" rows="3" runat="server">
<asp:listitem text="Red" value="R"/>
<asp:listitem text="Green" value="G" Selected="true"/>
<asp:listitem text="Blue" value="B"/>
</asp:listbox>
--------------------------------------------------------------------------------------------------
Microsoft or not, the code, once compiled, translates into HTML like this:
MS Explorer:
--------------------------------------------------------------------------------------------------
<p>
<span id="lbl1">Unbound, with ListItem.</span>
<p>
<select name="lstBox1" size="3" id="lstBox1"
style="background-color:Red;width:200px;">
<option value="R">Red</option>
<option selected="selected" value="G">Green</option>
<option value="B">Blue</option>
--------------------------------------------------------------------------------------------------
And this is the code rendered by Mozilla:
--------------------------------------------------------------------------------------------------
<p>
<span id="lbl1">Unbound, with ListItem.</span>
<p>
<select name="lstBox1" size="3" id="lstBox1">
<option value="R">Red</option>
<option selected="selected" value="G">Green</option>
<option value="B">Blue</option>
--------------------------------------------------------------------------------------------------
My question is - what happened to the "style" tag in Mozilla ? As a result,
the page does look VERY different than the page rendered by Explorer !
In my ASP book I read that ASP.net, regardless of the language (VB, C#...)
and the controls used, still sends the result in standard HTML, as much as
possible (meaning that if a feature exists in ASP.NET but not in HTML,
obviously, it won't be taken into consideration by the browser). Still, the
background-color is standard HTML, or the "width"- there's nothing fancy
about this code, like, for instance, usage of a Calendar Web Control, or an
Ad Rotator, or a RangeValidator. So either the book is wrong, either Mozilla
understands HTML only partially.
Thank you,
Alex
I am learning ASP.net (for the moment, I'm still writing the code by hand,
in Notepad - VS.NET can wait for now).
The original text code is this:
--------------------------------------------------------------------------------------------------
<p>
<asp:label id="lbl1" text="Unbound, with ListItem." runat="Server"/>
<p>
<asp:listbox id="lstBox1" onselectedindexchanged="listbox_Changed"
width="200" backcolor="Red" rows="3" runat="server">
<asp:listitem text="Red" value="R"/>
<asp:listitem text="Green" value="G" Selected="true"/>
<asp:listitem text="Blue" value="B"/>
</asp:listbox>
--------------------------------------------------------------------------------------------------
Microsoft or not, the code, once compiled, translates into HTML like this:
MS Explorer:
--------------------------------------------------------------------------------------------------
<p>
<span id="lbl1">Unbound, with ListItem.</span>
<p>
<select name="lstBox1" size="3" id="lstBox1"
style="background-color:Red;width:200px;">
<option value="R">Red</option>
<option selected="selected" value="G">Green</option>
<option value="B">Blue</option>
--------------------------------------------------------------------------------------------------
And this is the code rendered by Mozilla:
--------------------------------------------------------------------------------------------------
<p>
<span id="lbl1">Unbound, with ListItem.</span>
<p>
<select name="lstBox1" size="3" id="lstBox1">
<option value="R">Red</option>
<option selected="selected" value="G">Green</option>
<option value="B">Blue</option>
--------------------------------------------------------------------------------------------------
My question is - what happened to the "style" tag in Mozilla ? As a result,
the page does look VERY different than the page rendered by Explorer !
In my ASP book I read that ASP.net, regardless of the language (VB, C#...)
and the controls used, still sends the result in standard HTML, as much as
possible (meaning that if a feature exists in ASP.NET but not in HTML,
obviously, it won't be taken into consideration by the browser). Still, the
background-color is standard HTML, or the "width"- there's nothing fancy
about this code, like, for instance, usage of a Calendar Web Control, or an
Ad Rotator, or a RangeValidator. So either the book is wrong, either Mozilla
understands HTML only partially.
Thank you,
Alex