master-pages

How to set css class on active menu item using a masterpage?

烈酒焚心 提交于 2019-12-02 15:21:36
问题 How to set the Active menu item color when i click the sub submenu items or main item in asp.net master page. My code is (master page source) <ul class="art-menu"> <li><a href="#" class="{ActiveItem}"><span class="l"></span><span class="r"></span><span class="t">Submission</span> </a> <ul> <li><a href="../QuoteStatus.aspx">Search Submission</a></li> <li><a href="../NewQuote.aspx">New Submission</a></li> </ul> </li> <li><a href="#"><span class="l"></span><span class="r"></span><span class="t"

MasterDetailPage in Xamarin.Forms App

大城市里の小女人 提交于 2019-12-02 07:42:27
问题 Is it possible to create a similar side menu in Xamarin.Forms ? 回答1: I search a small menu. modify a size width to MasterPage You could change the width of the Master page in MasterDetailPageRenderer . First, create a BindableProperty in your custom MasterDetailPage class: public class MyMasterDetailPage : MasterDetailPage { public static readonly BindableProperty DrawerWidthProperty = BindableProperty.Create( "WidthRatio", typeof(int), typeof(MyMasterDetailPage), (float)0.2, propertyChanged:

Removing master layout from view (MVC2)

戏子无情 提交于 2019-12-02 07:28:20
if i need remove master layout from my view, how can i do it in MVC2? i tried put code in my view that was shown in documentation http://sparkviewengine.com/documentation/master-layouts : , but it still bring my Application.spark layout :-/ any ideas why? Not tested, but what if you create and empty master layout, and say <use master="EmptyMaster" /> in the top of your view? Or you could call on the empty master from the controller; return View("View", "EmptyMaster"); Don't know if it'll work, but it's worth a shot. I know this answer is a litle (maybe a lot) late but you can also use the

Get and cast Masterpage UserControl from Content Page to access specific UC Property

大城市里の小女人 提交于 2019-12-02 05:33:12
问题 I have a MasterPage (MyBoxx.Master) referencing 2 usercontrols : <%@ Master Language="C#" AutoEventWireup="true" CodeFile="MyBoxx.master.cs" Inherits="MyBoxxMaster" %> <%@ Register TagPrefix="uc1" TagName="Header" Src="Header.ascx" %> <%@ Register TagPrefix="uc1" TagName="Footer" Src="Footer.ascx" %> My user control "Header" contains among other things a searchbox. I want to hide this searchbox when visiting some pages. Therefore I added a boolean property to my user control and use this

MasterDetailPage in Xamarin.Forms App

江枫思渺然 提交于 2019-12-02 04:25:26
Is it possible to create a similar side menu in Xamarin.Forms ? I search a small menu. modify a size width to MasterPage You could change the width of the Master page in MasterDetailPageRenderer . First, create a BindableProperty in your custom MasterDetailPage class: public class MyMasterDetailPage : MasterDetailPage { public static readonly BindableProperty DrawerWidthProperty = BindableProperty.Create( "WidthRatio", typeof(int), typeof(MyMasterDetailPage), (float)0.2, propertyChanged: (bindable, oldValue, newValue) => { }); public float WidthRatio { get { return (float)GetValue

ASP.NET dynamically adding UserControl to PlaceHolder, not fire Click Event, only Page_Load

余生长醉 提交于 2019-12-02 04:01:20
In my ASP.Net page I have PlaceHolder and Button. When user click on this button, I add some UserControls from my Interface method getControl to the PlaceHolder. Code: protected void ActionBtn_Click(object sender, EventArgs e) { if (provider != null) { actualObject = (PlaceHolder)provider.getControl(); PlaceHolder1.Controls.Add(actualObject); } } Method getControl: public object getControl() { ph = new PlaceHolder(); exportInbBtn = new Button(); exportInbBtn.Text = "Export Inventury"; exportInbBtn.Click += new EventHandler(myButton_ServerClick); ph.Controls.Add(exportInbBtn); exportInbBtn.ID =

Creating nested master pages in ASP.NET Web Application

南楼画角 提交于 2019-12-02 03:12:39
问题 Is it possible to create nested master pages in an ASP.NET Web Application projects as one can do in ASP.NET Website projects? I am using Visual Studio 2008 and working on an ASP.NET Web Application. While creating a master page there is no option to choose another master page which if was available would have allowed me to create nested master pages. Have anyone faced similar issue? Is any sort of work around recommended? Thanks in advance for any help. Cheers. 回答1: Yes, from version 2 of

Creating nested master pages in ASP.NET Web Application

*爱你&永不变心* 提交于 2019-12-02 02:15:40
Is it possible to create nested master pages in an ASP.NET Web Application projects as one can do in ASP.NET Website projects? I am using Visual Studio 2008 and working on an ASP.NET Web Application. While creating a master page there is no option to choose another master page which if was available would have allowed me to create nested master pages. Have anyone faced similar issue? Is any sort of work around recommended? Thanks in advance for any help. Cheers. Yes, from version 2 of the .NET framework, nested master pages have been supported. One caveat is that you won't get design time

Pass master page control values on content page on page_load

人盡茶涼 提交于 2019-12-02 02:13:41
问题 I have a dropdowlist on master page and I want to pass the selected value on content pages when a content page loads. My problem is that the value passes only when I change value on the dropdownlist. So when a page load I have to reselect from dropdownlist to capture the value of the dropdown. If I am browsing the content pages the selected value doesnt pass on page load. My master page code .net: <asp:DropDownList ID="ddlcategories" runat="server" DataSourceID="SqlDataSourcecategories"

How to hide content on certain pages and not others via a Master Page?

徘徊边缘 提交于 2019-12-02 00:52:46
Read this thread but didn't really answer my question and there were quite a few suggestions so not sure if they are on the right track: Master Page content filtering with respect to asp page What I have is a site with 1 Master Page and in it is a global footer that all pages use. I want to eliminate the footer on only 1 page (i.e. the login page) but keep all the other master page content intact. I know I could create a separate Master Page just for this login page but it seems overkill. Is there a way to put in some logic that if it's only this specific page that it would hide the footer and