Join Joe Marini for an in-depth discussion in this video Using server-side detection with ASP.NET, part of Learning Mobile Web Design & Development.
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 that actually does this.…
This is the C# code that is behind the DetectTest.ASP.x page. And in the Page…
Author
Released
7/20/2011- Implementing well-defined web standards
- Working with Modernizr and Mobile Boilerplate
- Building a first mobile web page
- Understanding content adaptation strategies
- Designing forms for mobile
- Detecting client capabilities with script
- Using server-side detection with PHP and ASP.NET
- Working with mobile browser capabilities
- Viewing and testing the mobile site on device emulators
Skill Level Beginner
Duration
Views
Related Courses
-
HTML Essential Training
with James Williamson5h 54m Beginner -
Git Essential Training
with Kevin Skoglund6h 25m Beginner
-
Introduction
-
Welcome59s
-
Using the exercise files1m 46s
-
-
1. Understanding the Mobile Web
-
A survey of mobile sites11m 44s
-
Targeting mobile browsers4m 31s
-
2. Mobile Web Development Guidelines
-
Designing for one web3m 43s
-
-
3. Setting Up a Development Environment
-
Installing the tools3m 52s
-
Installing device emulators17m 5s
-
Using device emulators13m 8s
-
-
4. Adapting Desktop Sites for Mobile Devices
-
Controlling the viewport layout12m 50s
-
Designing forms13m 30s
-
Using CSS media queries11m 24s
-
5. Creating Mobile-Optimized Pages
-
6. Understanding Mobile Browser Capabilities
-
Measuring performance7m 41s
-
Detecting device movement5m 21s
-
Using touch events10m 38s
-
-
7. Putting It All into Practice
-
Viewing the site on devices4m 46s
-
Conclusion
-
Goodbye2m 33s
-
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.
CancelTake notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.
Share this video
Embed this video
Video: Using server-side detection with ASP.NET