master-pages

ASP.NET MVC2 Master Page - Server side script not rendering, first bracket being escaped

六月ゝ 毕业季﹏ 提交于 2019-12-23 13:07:15
问题 I have a master page which I am using as a template to allow me to define meta tags per page. My master page takes in a model which contains the meta information, here is an example of what I am trying to do the following: <meta name="description" content="<%= Model.description %>" /> <meta name="keywords" content="<%= Model.keywords %>" /> However, when I check the HTML once the page is rendered I get this: <meta name="description" content="<= Model.description %>" /> <meta name="keywords"

Parse Error ViewMasterPage<TModel>

ぃ、小莉子 提交于 2019-12-23 12:45:53
问题 I am trying to implement a strongly typed master page and using this page as an example: How to create a strongly typed master page using a base controller in ASP.NET MVC I have the following declaration in my masterpage: <%@ Master Language="C#" Inherits="System.Web.Mvc.ViewMasterPage<InsTech.ForeSight.Web.Mvc.ModelBase>" %> When I try to run I get: Parser Error Message: Could not load type 'System.Web.Mvc.ViewMasterPage<InsTech.ForeSight.Web.Mvc.ModelBase>' I am not really sure why it can't

Master Page getting Could Not Load Type error when publishing

自古美人都是妖i 提交于 2019-12-23 12:35:42
问题 Everything works find locally, but when I publish my asp.net application to a remote server I get the following error: Server Error in '/' Application. Parser Error Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. Parser Error Message: Could not load type 'JournalPages.MasterMain'. Source Error: Line 1: <%@ Master Language="C#" AutoEventWireup=

Can I use more than one master page on a sharepoint site?

折月煮酒 提交于 2019-12-23 12:31:04
问题 I have been asked to modify a home page to a completely new design, all other pages will remain exactly the same. I am a little green when it comes to sharepoint. I have created the masterpage, however when i choose set as default master page or set as customer masterpage it changes for the entire site. I would only like to change the home page. The only option I have come across at this point would seem to be Detach from page layout which would not be ideal as the remainder of the site may

how to view master page in browser

眉间皱痕 提交于 2019-12-23 09:48:05
问题 just learning master page, i have a master page which include a content. but how to view the page .master in browser? what it the url? <%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <asp:ContentPlaceHolder id="head" runat="server"> <

Get ID of Master Page object in Content Page

安稳与你 提交于 2019-12-23 09:46:34
问题 If the master page has a label with the id label1 how do I control that id in the content page. The id is not passed down so i can't control it inherently. For example if i have a control with the id contentLabel i can access it code by just typing contentLabel.(whatever i'm doing) 回答1: Here are two options: 1 : make sure your content aspx specifies MasterType: <%@ MasterType VirtualPath="~/yourMasterPageName.master" %> Doing this lets your content page know what to expect from your master

Get Page Title In Master Page Code Behind

可紊 提交于 2019-12-23 09:32:08
问题 I want to get the page title in c# master page code behind. I tried using Page.Header.Title; property but it return null . Please help me to get the title. Thanks in advance. Shibin V.M 回答1: In your page head include runat="server" then you can easily get the Page title by string Title = Page.Title; EDIT: Using the Title property of Page requires a header control on the page. (e.g. <head runat="server" /> ). 回答2: You can set the page title on Page_Load Event like this protected void Page_Load

Is there a concept of a master page (like in asp.net) for WPF?

与世无争的帅哥 提交于 2019-12-23 09:01:14
问题 I've started a WPF (web-based) application and it has multiple pages. I want to implement the concept of a Master page in WPF, so that when I make changes in the design/layout of one page then all the others pages will follow suit without all the copy and paste. 回答1: I don't think the concept of Master Page is valid in WPF basically because there are no pages. In WPF exists styles, templates and DataTemplates. Not only that, using the DockPanel and other containers you can achieve most of the

Why is my ASP Page.Request.Files[] always empty? I've tried all posted fixes

不想你离开。 提交于 2019-12-23 07:55:33
问题 We're 4 guys making a website for our final school project. We need to allow a user to upload a pdf. We're using Visual Studio 2012, and we have a Master page set up, and the whole login-process and user-creation works. We're using jQuery, and also jQueryMobile because the site needs to work for phones as well, and this makes it a bit easier. But when we want to check the files the client is trying to upload in our code behind, Request.Files is always empty. Why is this? I have the enctype

Accessing masterpage properties from child pages in ASP.net VB

為{幸葍}努か 提交于 2019-12-23 07:48:27
问题 I have masterpage.master.vb where I have properties, such as; Private _SQLerror As String Public Property SQLerror() As String Get Return _SQLerror End Get Set(ByVal value As String) _SQLerror = String.Empty End Set End Property Then I have an aspx page in which I need to use this property in, such as; If **[masterpage property sqlerror]** = Nothing Then InternalSQLErrLabel.Text = ("No Errors Reported") End If Can anyone give me an idea how to go about this? I've tried searching but most