Styling DropDown list button
Add CssClass="form-control" like this:
<asp:DropDownList ID="CustomersDropDownList" CssClass="form-control" runat="server" Width ="200px"></asp:DropDownList>
Disable Site.Mobile.Master
Add the following class into ViewSwitcher code-behind file:
public class MyWebFormsFriendlyUrlResolver : Microsoft.AspNet.FriendlyUrls.Resolvers.WebFormsFriendlyUrlResolver
{
protected override bool TrySetMobileMasterPage(HttpContextBase httpContext, Page page, String mobileSuffix)
{
if (mobileSuffix == "Mobile")
{
return false;
}
else
{
return base.TrySetMobileMasterPage(httpContext, page, mobileSuffix);
}
}
}
Then, edit the code on RouteConfig.cs (located in App_Start) as follows:
public static void RegisterRoutes(RouteCollection routes)
{
var settings = new FriendlyUrlSettings();
settings.AutoRedirectMode = RedirectMode.Permanent;
routes.EnableFriendlyUrls(settings, new MyWebFormsFriendlyUrlResolver());
}
Σχόλια