master-pages

Running MasterPages from the Layouts directory

To simplify our SharePoint environment I am wanting to have a central and single location where all of the master pages are stored so I was hoping to reference the masterpage files directly from the _layouts directory. I add the files to the "\LAYOUTS\MyMasterPages" directory and then update the SPWeb object to use that path: web.Maste...

asp:ImageButton not firing onclick event

I have a page that uses a master page, several RequiredFieldValidators, and the Web Toolkit autocomplete extender. The following code only shows the bare minimum of the page: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Login.aspx.cs" MasterPageFile="~/master.master" Inherits="Login" %> <asp:Content id="...

Can't see my picture that I use in my webSite

hello. I use a template for my website and I fill its cells with an Image control and set that with the URl of picture, but when I upload my website I can't see that Picture. I Created a new folder for all Images and use Master page for this website. LINK : http://www.aalaa.ir/az/ ...

FormView on a Master Page can't see databound controls through ContentPlaceHolder boundary

I have a number of similarly structured FormViews. In an effort to avoid duplicate markup, I've created a master page that contains the FormView, and placed a ContentPlaceHolder inside the FormView. The specific databound controls - which are the only thing that change from page to page - are then on the page that uses that master page. ...

CSS div problems with position

I have a css based asp.net masterpage. I am using a browse div located directly above a navigation div. The browse div is flowing down behind the navigation div. I did some playing around with the position and found that if i change the navigation position it fixes it, but everything in that div moves half way down the page. I have d...

ASP.NET MVC Master Page: "'Model' is not a member of 'System.Web.UI.Page'"

My View is strongly typed to an ADO.NET Entity Framework class with a boolean property ShowMenu. <%@ Page ... MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage(Of Thing)" %> ... I want to do something like this on my Master Page... <%@ Master ... Inherits="System.Web.Mvc.ViewMasterPage" %> ... <div id="men...

Masterpage Dropdown List not keeping Selected Index

Ok, my masterpage has a dropdown which controls size which affects a lot of things. I need to access the dropdown index from content pages so I do it using this code. public partial class MasterPage : System.Web.UI.MasterPage { public DropDownList MySize { get { return _ddlSize; } } } I am using Ajax and when the size changes the menu...

How to translate content page in a master page after language change (ASP.NET)

Hi, I have a content page in a master page in ASP.NET. What is going on is that the user click on a button in the right corner of the master page and that change the current language. What does the button is changing the Session for the new selected language. What is happening is that when you click on a button, the code is executed AF...

JQuery, MVC & Master Pages

What is the correct way to include the JQuery libraries via a master page? It appears there is a set for development and a set for production. I tried an "#if DEBUG" in my master page and it tripped errors left and right. I was also using <% %> style code and found out that I am not allowed to do that either. And my google-fu has not...

Masterpages in JSP

Hi, is there a concept like ASP Masterpages in JSP? Regards. ...

Disable automatic including of style sheets within a SiteFinity theme

I'm working on integrating an HTML template slice into a SiteFinity theme and am wondering if there is a way to disable the automatic inclusion of the style sheets. I would prefer to manual include them from the MasterPage, if possible? ...

Automatically sanitize entries on HttpRequestValidationException

The infamous A potentially dangerous Request.Form value was detected from the client question :) Here's my use case: I have a FCKEditor control on a webpage, that allows users to type HTML. That precise webpage has validation turned off to allow its use, but my masterpage has linkbuttons that can raise postbacks on other pages. I obvi...

Remove ctl00$ContentBody$ from rendered control ID

I made some changes to an existing application that was previously just straight HTML and Javascript. To add server-side functionality, I chose ASP.NET, and took advantage of the Master Page concept. Unfortunately, on one huge web form, the control IDs are all mangled with the "ctl00$ContentBody$" prefix. I tacked a runat="server" on ...

Using resource files in SharePoint MasterPages

Hi. I haven't been able to figure out how to use strings from resource files (resx) in SharePoint master pages. I know how to use it with server controls, but can I somehow extract a value and use it in generalt html. I.e. in an alt attribute on a img tag? <img src="photo.jpg" alt="my_resource_entry_here" /> ...

assigning ViewData to nested masterpages

Is there a good way to assign ViewData to nested master pages? For example, in my top level masterpage I might have info on the logged in user. I also have a nested masterpage that is displayed when the user is on any departmental page. I want that data available ONLY on departmental pages. So this is how it looks: Top Level Master Pag...

Master Page Weirdness - "Content controls have to be top-level controls in a content page or a nested master page that references a master page."

This is weird. I added a brand new Web Application project to my solution in Visual Studio 2008. Created a master page. Made zero modifications. Created a new webform. Set its masterpage to the MP i just created. Still, no modifications. No markup. No user controls. No references. Nothing. However when I try to run it, i ge...

Is it possible to share a masterpage between MVC and webforms?

I am adding MVC to a project that has MANY legacy webform pages. This works fine. However, I currently have a separate masterpage for MVC and for the webforms. The two master pages produce essentially identical output. I'd really like to kill the webforms one and just use the MVC master page with all my pages and stay DRY. Not bei...

Any way to prevent master pages from changing element IDs?

I'm looking at adding master pages to an existing site but have found that once I do, the elements' IDs get prepended with a code (e.g. ctl00_MainPageContent_). Unforunately, this breaks existing scripts on the page that use the original, unmodified element ID. I realize that I can replace it with <%= Element.ClientID %> but it'd be a...

dynamic control values

how to get the text of the dynamical textbox which is added to the dynamical table,which is added to the panel on the form ,that form is having the masterpage ...

Parse Error ViewMasterPage<TModel>

I am trying to implement a strongly typed master page and using this page as an example: http://stackoverflow.com/questions/768236/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...