[thelist] Is it my Opera or the server?

Nik Schramm n at industriality.com
Wed Sep 25 08:45:00 CDT 2002


On 25.Sep.02 15:16 Peter Kaulback wrote

> A friend has put up a site in ASP.NET that works fine in IE and Mozilla but
> in Opera 6 it gives me this error:
> Server Error in '/KS_WEB' Application.
>
> Object reference not set to an instance of an object.

Ah yes, that sounds familiar. I'll bet that this page came up after a
form was submitted containing a <select> drop-down using the <optgroup>
tag to group different <option>s in the list.

Opera has a bug, that forbids the use of the <optgroup> tag. It fails to
transmit the selected <option>, therefore the next page is missing a
reference.

Either filter out Opera using ServerSide UserAgentString detection (this
is easy with .NET, use Request.UserAgent and check if it contains
"Opera", in which case it's probably an Opera browser) and code the
poage in such a way that Opera does not get <optgroup> tags in its page
or alternatively lose the <optgroup> tags altogether.

If that ain't it, I don't know, but I came up against this and managed
to solve it using he first method I described.

--
/nik




More information about the thelist mailing list