eliminati files inutili (pulizia)
This commit is contained in:
@@ -1,23 +0,0 @@
|
||||
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site.Mobile.master.cs" Inherits="MP_IO.Site_Mobile" %>
|
||||
<%@ Register Src="~/ViewSwitcher.ascx" TagPrefix="friendlyUrls" TagName="ViewSwitcher" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<title></title>
|
||||
<asp:ContentPlaceHolder runat="server" ID="HeadContent" />
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<div>
|
||||
<h1>Mobile Master Page</h1>
|
||||
<asp:ContentPlaceHolder runat="server" ID="FeaturedContent" />
|
||||
<section class="content-wrapper main-content clear-fix">
|
||||
<asp:ContentPlaceHolder runat="server" ID="MainContent" />
|
||||
</section>
|
||||
<friendlyUrls:ViewSwitcher runat="server" />
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,12 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace MP_IO
|
||||
{
|
||||
public partial class Site_Mobile : System.Web.UI.MasterPage
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
-52
@@ -1,52 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MP_IO
|
||||
{
|
||||
|
||||
|
||||
public partial class Site_Mobile {
|
||||
|
||||
/// <summary>
|
||||
/// HeadContent control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.ContentPlaceHolder HeadContent;
|
||||
|
||||
/// <summary>
|
||||
/// form1 control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// FeaturedContent control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.ContentPlaceHolder FeaturedContent;
|
||||
|
||||
/// <summary>
|
||||
/// MainContent control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.ContentPlaceHolder MainContent;
|
||||
}
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ViewSwitcher.ascx.cs" Inherits="MP_IO.ViewSwitcher" %>
|
||||
<div id="viewSwitcher">
|
||||
<%: CurrentView %> view | <a href="<%: SwitchUrl %>" data-ajax="false">Switch to <%: AlternateView %></a>
|
||||
</div>
|
||||
@@ -1,39 +0,0 @@
|
||||
using Microsoft.AspNet.FriendlyUrls.Resolvers;
|
||||
using System;
|
||||
using System.Web;
|
||||
using System.Web.Routing;
|
||||
|
||||
namespace MP_IO
|
||||
{
|
||||
public partial class ViewSwitcher : System.Web.UI.UserControl
|
||||
{
|
||||
protected string CurrentView { get; private set; }
|
||||
|
||||
protected string AlternateView { get; private set; }
|
||||
|
||||
protected string SwitchUrl { get; private set; }
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
// Determine current view
|
||||
var isMobile = WebFormsFriendlyUrlResolver.IsMobileView(new HttpContextWrapper(Context));
|
||||
CurrentView = isMobile ? "Mobile" : "Desktop";
|
||||
|
||||
// Determine alternate view
|
||||
AlternateView = isMobile ? "Desktop" : "Mobile";
|
||||
|
||||
// Create switch URL from the route, e.g. ~/__FriendlyUrls_SwitchView/Mobile?ReturnUrl=/Page
|
||||
var switchViewRouteName = "AspNet.FriendlyUrls.SwitchView";
|
||||
var switchViewRoute = RouteTable.Routes[switchViewRouteName];
|
||||
if (switchViewRoute == null)
|
||||
{
|
||||
// Friendly URLs is not enabled or the name of the switch view route is out of sync
|
||||
this.Visible = false;
|
||||
return;
|
||||
}
|
||||
var url = GetRouteUrl(switchViewRouteName, new { view = AlternateView, __FriendlyUrls_SwitchViews = true });
|
||||
url += "?ReturnUrl=" + HttpUtility.UrlEncode(Request.RawUrl);
|
||||
SwitchUrl = url;
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
-16
@@ -1,16 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MP_IO
|
||||
{
|
||||
|
||||
|
||||
public partial class ViewSwitcher {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user