PC Review


Reply
Thread Tools Rating: Thread Rating: 10 votes, 4.60 average.

Request.Browser.MajorVersion.ToString() returns null on ASP.NET 2.0 Beta 1 and Beta 2

 
 
ocn0248@hotmail.com
Guest
Posts: n/a
 
      2nd May 2005
The code bellow must be executed under safari web-browser.

I need to know how I can get the major version of the safari
web-browser.

Thanks in advance

vb.net code
Partial Class SafariTest
Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
Label1.Text = "Request.Browser.MajorVersion.ToString():" +
Request.Browser.MajorVersion.ToString()

End Sub
End Class

<%@ Page Language="VB" AutoEventWireup="false"
CodeFile="SafariTest.aspx.vb" Inherits="SafariTest" %>

aspx code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Label ID="Label1" runat="server"
Text="Label"></asp:Label><br />

</div>
</form>
</body>
</html>

 
Reply With Quote
 
 
 
 
Bruce Barker
Guest
Posts: n/a
 
      3rd May 2005
update the browsercaps section in machine.config

the agent string for safari look like:

Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/xx (KHTML, like
Gecko) Safari/yy

where xx is the os build number and yy is briowser build number


-- bruce (sqlwork.com)


<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> The code bellow must be executed under safari web-browser.
>
> I need to know how I can get the major version of the safari
> web-browser.
>
> Thanks in advance
>
> vb.net code
> Partial Class SafariTest
> Inherits System.Web.UI.Page
>
> Protected Sub Page_Load(ByVal sender As Object, ByVal e As
> System.EventArgs) Handles Me.Load
> Label1.Text = "Request.Browser.MajorVersion.ToString():" +
> Request.Browser.MajorVersion.ToString()
>
> End Sub
> End Class
>
> <%@ Page Language="VB" AutoEventWireup="false"
> CodeFile="SafariTest.aspx.vb" Inherits="SafariTest" %>
>
> aspx code
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
> "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
>
> <html xmlns="http://www.w3.org/1999/xhtml" >
> <head runat="server">
> <title>Untitled Page</title>
> </head>
> <body>
> <form id="form1" runat="server">
> <div>
> <asp:Label ID="Label1" runat="server"
> Text="Label"></asp:Label><br />
>
> </div>
> </form>
> </body>
> </html>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Index with mulitple value returns and muliple column returns solar+CSE Microsoft Excel Worksheet Functions 4 12th Jun 2009 04:43 PM
button click clears textbox and returns null error Tim Zych Microsoft ASP .NET 2 7th Jun 2004 06:16 AM
=Now() returns #Name? and =Date() returns "compile error" Microsoft Access Reports 1 28th Jan 2004 12:28 AM
Null result when combining null field with non-null field in ADP View Lauren Quantrell Microsoft Access Form Coding 8 17th Nov 2003 03:34 AM
Re: sum of vlaue and numerical field returns null Duane Hookom Microsoft Access Queries 0 25th Sep 2003 03:58 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:44 AM.