How to Use Server-Side Detection With ASP.NET


show more Using server-side detection with ASP.NET provides you with in-depth training on Developer. Taught by Joe Marini as part of the Mobile Web Design & Development Fundamentals show less
please wait ...

Using server-side detection with ASP.NET

In this example, I am going to show how to use ASP.NET to examine an incoming user agent string and then figure out whether or not the incoming user agent is from a mobile browser or not. And this is going to be pretty similar to what I did for the PHP example. So here in my code I've got the DetectTest.aspx file-- this is from the Example files folder-- and I've also got the code behind file DetectTestASP.aspx.cs, and I have got my ExampleSnippets open as well. Scroll down to the Server-Side Detection part for ASP.NET.

So here in the ASP.NET file, we've got some text that describes the example, and then I have a paragraph here with a span that is going to act as a placeholder for what the user agent string is. And then in here I've got an h2 that's going to act as a container for the result string, which will indicate whether or not this is a mobile browser. So this is set up very similar to the way that I did the PHP example. Let's go take a look at the code tha...

Using server-side detection with ASP.NET
Video duration: 4m 54s 5h 47m Beginner

Viewers:

Using server-side detection with ASP.NET provides you with in-depth training on Developer. Taught by Joe Marini as part of the Mobile Web Design & Development Fundamentals

Subjects:
Developer Web
Software:
HTML
Author:
please wait ...