Advertisement
Guest User

Untitled

a guest
Jun 20th, 2018
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8"/>
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>@ViewBag.Title - My ASP.NET Application</title>
  7. @Styles.Render("~/Content/css")
  8. @Scripts.Render("~/bundles/modernizr")
  9.  
  10. <script type='text/javascript'>
  11. function customResize(){
  12. if ($(window).width() < 1000) {
  13. $("#login").load('/Account/Register.cshtml');
  14.  
  15. }
  16. else {
  17. $("#login").load('/Account/Login.cshtml');
  18. }
  19. }
  20.  
  21. function onLoad(){
  22. window.onresize = myFunction;
  23. }
  24.  
  25. function myFunction() {
  26. var w = window.outerWidth;
  27. var h = window.outerHeight;
  28. var txt = "Window size: width=" + w + ", height=" + h;
  29. document.getElementById("login").innerHTML = txt;
  30. }
  31. </script>
  32. </head>
  33.  
  34. <body onload="onLoad">
  35. <b>@Request.Browser.ScreenPixelsWidth</b>
  36.  
  37. <div id='login'>
  38. <b>@Request.Browser.ScreenPixelsWidth</b>
  39.  
  40. </div>
  41.  
  42.  
  43. <div class="container body-content">
  44. @RenderBody()
  45. <hr />
  46. <footer>
  47. <p>&copy; @DateTime.Now.Year - My ASP.NET Application</p>
  48. </footer>
  49. </div>
  50.  
  51. @Scripts.Render("~/bundles/jquery")
  52. @Scripts.Render("~/bundles/bootstrap")
  53. @RenderSection("scripts", required: false)
  54. </body>
  55. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement