Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

ASP.net Event for mobile phone flip

Posted on 2014-09-04
5
Medium Priority
?
136 Views
Last Modified: 2014-09-08
Hi

I have a standard website application in ASP.net. Is there a way to trigger code when a mobile device is flipped 90 degrees, in other words from a Microsoft portrait view to a landscape view
0
Comment
Question by:Murray Brown
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 12

Assisted Solution

by:Ammar Gaffar
Ammar Gaffar earned 800 total points
ID: 40303252
Hi,
As I know, only client side code can do that, if you are using jQueryMobile in your asp.net application then visit this link:
http://api.jquerymobile.com/orientationchange/

Good Luck
0
 
LVL 12

Expert Comment

by:Ramkisan Jagtap
ID: 40303300
$(window).on("orientationchange",function(){
  alert("The orientation has changed!");
});
0
 

Author Comment

by:Murray Brown
ID: 40303430
Hi
I should have mentioned that my ASP.net project uses VB.net code.
Thanks Ramkisan. Where would the code (which I assume is JavaScript) go
0
 
LVL 12

Accepted Solution

by:
Ramkisan Jagtap earned 1200 total points
ID: 40305087
Hi Murbro,

You can include this code on top or bottom of the aspx page.

<script type="text/javascript">
$(window).on("orientationchange",function(){
   alert("The orientation has changed!");
 });
<script>
0
 

Author Closing Comment

by:Murray Brown
ID: 40310722
Thank you both
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question