Results 1 to 10 of 10

Thread: asp.net webform app not working in iphone (safari and chrome)

  1. #1

    Thread Starter
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    25,464

    Question asp.net webform app not working in iphone (safari and chrome)

    I wrote an asp.net webforms app, that is working perfectly in my desktop browser (chrome), but it doesn't load in my iphone browser (safari or chrome). at first i thought it was a css problem, but it doesn't appear to be that... What could be causing this?

  2. #2
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Re: asp.net webform app not working in iphone (safari and chrome)

    Please share the details like what is the issue you are facing(Error messages, screen shots)
    Please mark you thread resolved using the Thread Tools as shown

  3. #3

    Thread Starter
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    25,464

    Re: asp.net webform app not working in iphone (safari and chrome)

    Ok. I've done more research. For example, this works (in ios safari)...

    www.scproject.biz/numbers_game.php#playnow

    (in this page, there are more elements, specfically wider elements. Would that change anything???)

    This doesn't work (in ios safari)...

    www.scproject.biz/hangman.php

    (in this page, there is only several sections with the iframe centred, though i've changed the css for testing)

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
    
    <!DOCTYPE HTML>
    <html>
     <head>
      <meta charset="UTF-8">
      <title>hangMan</title>
      <link rel="stylesheet" href="http://www.scproject.biz/stylesheet.css">
      <meta name="keywords" content=".Net, VB.Net, Visual Basic, Visual Basic.Net, SCProject, SCProject.Biz, hangMan">
      <meta name="author" content="Paul Long">
     </head>
    
     <style>
    
       body {
         background-color: white;
       }
       #titlebar {
         background-color: white;
         margin-top: -10px;
       }  
       #outer {
           margin-left: 100px;
           margin-top: 50px;
           width: 500px;
           height: 550px;
       }
       #inner {
           width: 500px;
           height: 550px;
       }
       #page {
           width: 500px;
           height: 550px;
       }
       @media only screen and (min-device-width : 1600px) {
         #outer {
           background-color: white; 
         border-radius: 15px; 
         position: relative;
         float: left;  
           margin-left: 20%;
           width: 60%;
           height: calc(100vh - 330px); 
         }  
         #inner {
         position: relative;  
         margin: 10px 10px 10px 10px; 
         width: calc(100% - 20px);
         height: calc(100% - 20px);  
         border-radius: 15px;
         border: 2px solid #4682B4;  
       } 
       #page {
         position: relative;  
         width:500px;
         height:550px; 
         margin-left: auto;
         margin-right: auto;  
         top: 50%;
         transform: translateY(-50%);
         -ms-transform: translateY(-50%);
         -moz-transform: translateY(-50%);
         -webkit-transform: translateY(-50%);
         -o-transform: translateY(-50%);
       }
       }
       
     </style>
    
     <body>
    
     <!-- <title ' etc/>  -->   
    <!-- 
     -->  
      <br><br>
      <section id="outer">
          <section id="inner">
              <section id="page">
                <iframe src="http://www.scproject.biz/hangMan.aspx" width="500" height="550" frameborder="0"></iframe>
              </section> 
          </section>  
      </section><br><br><br>    
      
      
      
    
     <div style="position: relative;left: 175px; margin-top: -55px; clear: both; float: left;">Desktop Versions: <a href="http://code.msdn.microsoft.com/HangMan-de8308f1" target="new_page1">VB.Net</a> | <a href="http://code.msdn.microsoft.com/HangMan-C-version-e0d17f1b" target="new_page2">C#</a> | <a href="http://social.technet.microsoft.com/wiki/contents/articles/21036.hangman.aspx" target="new_page3">TechNet version (VB2013)</a><br><br></div>
    </body>
    </html>
    But the embedded .aspx alone, works (in ios safari)...

    www.scproject.biz/hangman.aspx

  4. #4
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Re: asp.net webform app not working in iphone (safari and chrome)

    I do not have ios to test. But I doubt this may be the issue.

    Code:
     position: relative;
    Since the position is relative it me move based on the size of the elements.

    Try playing with that value.

    Also you can take the help of https://caniuse.com/ to check the styles are supported in your browser are not.

    This will give a clear idea.
    Please mark you thread resolved using the Thread Tools as shown

  5. #5

    Thread Starter
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    25,464

    Re: asp.net webform app not working in iphone (safari and chrome)

    I finally tracked the error down. A badly formed closing tag in a code file used by nearly every page in my whole site was causing this problem. It'd been affecting the performance of my site for ages, but this problem didn't manifest itself until now. As soon as i read the source code of the safari page, i could see what the error was. A little more investigating and i found an <a /> instead of an </ a> was stopping my iframes loading on two pages... Unfortunately my desktop browser just ignored the error, or i would've found it much sooner.

  6. #6
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Re: asp.net webform app not working in iphone (safari and chrome)

    In these kind of conditions our god is IE, First we have to check then only move to other browsers
    Please mark you thread resolved using the Thread Tools as shown

  7. #7

    Thread Starter
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    25,464

    Re: asp.net webform app not working in iphone (safari and chrome)

    Quote Originally Posted by danasegarane View Post
    In these kind of conditions our god is IE, First we have to check then only move to other browsers
    So IE would've picked it up? I rarely use IE. Chrome is my preferred browser with Firefox as a backup for difficult times

  8. #8
    Superbly Moderated NeedSomeAnswers's Avatar
    Join Date
    Jun 2002
    Location
    Manchester uk
    Posts
    2,660

    Re: asp.net webform app not working in iphone (safari and chrome)

    Not it would not have, and really IE is pretty much dead as a browser Windows 10 comes with Edge and you should test against that instead. Chrome is still used by most web developers to develop against mainly because of the developers tools options, but then you should test against Edge, Safari and Firefox at the very least.

    The main issues you find when testing between browsers are still styles related which would not have found your issue, really your code editor should have flagged it up as an error.

    I noticed that your using an IFrame in your project, which can make your site vulnerable to cross site attacks and are rarely used anymore. Probably not an issue if your just doing creating something for your self but can become a big issue for commercial systems.
    Please Mark your Thread "Resolved", if the query is solved & Rate those who have helped you



  9. #9

    Thread Starter
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    25,464

    Re: asp.net webform app not working in iphone (safari and chrome)

    It’s not a commercial application. My code editor was notepad. I might’ve opened it in brackets when I originally wrote it...

  10. #10
    Superbly Moderated NeedSomeAnswers's Avatar
    Join Date
    Jun 2002
    Location
    Manchester uk
    Posts
    2,660

    Re: asp.net webform app not working in iphone (safari and chrome)

    Yeah i can see i just thought i would mention it fyi .

    Have you thought about downloading VSCode, and trying that for a code editor instead?

    A lot of people who dont like the bulkiness of full VS Studio use it for Web development, it would have flagged up your error.
    Please Mark your Thread "Resolved", if the query is solved & Rate those who have helped you



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width