-
ASP.NET Compatibility
I created a really simple Web Application in .NET as per the instructions in this VB-World tutorial:
http://vbworld.com/misc/vbnetuncovered3/index3.html
I then hit F5 to run it and it ran fine in IE 6.0. I then tried to view it from Netscape Navigator 4.78 and I only see one label. I thought that the whole idea of .NET was that it would automatically work with all browsers and most handheld devices. Am I doing something wrong?
Thanks for any help!
-
view the html source that is created in the Netscape browser and post it here..not the asp code. I can then look at it and see what might be the problem with netscape
-
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>WebForm1</title>
<meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0">
<meta name="CODE_LANGUAGE" content="Visual Basic 7.0">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form name="Form1" method="post" action="WebForm1.aspx" id="Form1">
<input type="hidden" name="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" value="" />
<input type="hidden" name="__VIEWSTATE" value="dDwxMzE4MjMxMzkzOztsPENoZWNrQm94MTs+PnU8H/nzTX+3M6I3jM+FeDyJ1vRb" />
<script language="javascript">
<!--
function __doPostBack(eventTarget, eventArgument) {
var theform = document.Form1;
theform.__EVENTTARGET.value = eventTarget;
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit();
}
// -->
</script>
<span id="Label1" style="Z-INDEX: 101; LEFT: 28px; POSITION: absolute; TOP: 34px"></span>
<span style="Z-INDEX: 106; LEFT: 30px; POSITION: absolute; TOP: 118px"><input id="CheckBox1" type="checkbox" name="CheckBox1" onclick="__doPostBack('CheckBox1','')" language="javascript" /><label for="CheckBox1">Move baby move!</label></span>
<input name="TextBox1" type="text" id="TextBox1" style="Z-INDEX: 102; LEFT: 178px; POSITION: absolute; TOP: 53px" />
<input type="submit" name="Button1" value="Button" onclick="if (typeof(Page_ClientValidate) == 'function') Page_ClientValidate(); " language="javascript" id="Button1" style="Z-INDEX: 103; LEFT: 29px; POSITION: absolute; TOP: 82px" />
<span id="Label2" style="Z-INDEX: 105; LEFT: 32px; POSITION: absolute; TOP: 56px">Enter an email address:</span>
</form>
</body>
</HTML>
It appears as if maybe it thinks Netscape 4.78 is IE 5.0.
-
ok i cant be sure on this, but look for any options for the project as if i remember correctly, there is asetting to specify whether you wnt the page outputted for ie only or any browser..I use notepad for my pages so I dont know exactly where to llok for this in VS .NET.
But i do think there is asetting like that.
-
I found an option to set the "Target schema" and I set it to IE 3.02 & Navigator 3.0 with JScript.
After rebuilding and opening it up in Navigator 4.78 again I get the same messed up page and the following code.
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>WebForm1</title>
<meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0">
<meta name="CODE_LANGUAGE" content="Visual Basic 7.0">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form name="Form1" method="post" action="WebForm1.aspx" id="Form1">
<input type="hidden" name="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" value="" />
<input type="hidden" name="__VIEWSTATE" value="dDwxMzE4MjMxMzkzOztsPENoZWNrQm94MTs+PnU8H/nzTX+3M6I3jM+FeDyJ1vRb" />
<script language="javascript">
<!--
function __doPostBack(eventTarget, eventArgument) {
var theform = document.Form1;
theform.__EVENTTARGET.value = eventTarget;
theform.__EVENTARGUMENT.value = eventArgument;
theform.submit();
}
// -->
</script>
<span id="Label1" style="Z-INDEX: 101; LEFT: 28px; POSITION: absolute; TOP: 34px"></span>
<span style="Z-INDEX: 106; LEFT: 30px; POSITION: absolute; TOP: 118px"><input id="CheckBox1" type="checkbox" name="CheckBox1" onclick="__doPostBack('CheckBox1','')" language="javascript" /><label for="CheckBox1">Move baby move!</label></span>
<input name="TextBox1" type="text" id="TextBox1" style="Z-INDEX: 102; LEFT: 178px; POSITION: absolute; TOP: 53px" />
<input type="submit" name="Button1" value="Button" onclick="if (typeof(Page_ClientValidate) == 'function') Page_ClientValidate(); " language="javascript" id="Button1" style="Z-INDEX: 103; LEFT: 29px; POSITION: absolute; TOP: 82px" />
<span id="Label2" style="Z-INDEX: 105; LEFT: 32px; POSITION: absolute; TOP: 56px">Enter an email address:</span>
</form>
</body>
</HTML>
I haven't looked at it really, really closely, but it appears to be the same thing.
Any idea why it didn't any? I've cleared the cache, rebuilt the project, etc.
-
hmm I really dont know..except to say try Netscape 6.1 to see what it does..it is probably the style atributes where the problem lies.
-
ASP.NET generates HTML 3.2 compliant code but Netscape adds some own rules to it. For example, Netscape needs all <script> tags between the <head> tag, if not it won't render. Netscape really sucks !!