Access BasePage from the master page

I'm adding a custom control dynamically in master page code-behind: try { // Add custom sidenav menu control dynamically SideNavMenu sidenav = new SideNavMenu(); tempPath = Request.RawUrl.ToLower(); path = tempPath.Contains(@"/sitename") ? tempP

how to hide the contents of the master page in a Web page

I want to open a regular .aspx page in a rad window.But the regular page consists of Site Map.I don't want that sitemap to be displayed when it is opened in rad window. Please suggest me some solution. I already tried this: this.MasterpageFile="..//t

script address in the master page

i use this code in master page: <script src="Scripts/jquery.min.js" type="text/javascript"></script> <script src="Scripts/jquery.cycle.all.js" type="text/javascript"></script> <script type

modify the div content in the master page on the aspx page

This is a simple question, or not. I have a master page which has three sections, in one section is a logo gallery. There are certain pages in the site i would like to inject text in that area and remove the image gallery, can this be done with jquer

ASP.NET changes masterpage usercontrol from the content page

I'm developing my ASP.NET web app using VS2010,C#. I have a user control contained in my masterpage, and now I'm going to access my usercontrol from the content page, is it possible to change usercontrol via content page client side events? I'm going

How to set the master page dynamically?

I have requirement in which i want to set different Master Pages for the Same Page depending upon userid(i.e. for one user it must set one master page and for another user it must set another master ).Can we set different Master pages for any page dy

hide google analytic code

Is it possible not to show the google analytic code on the master page? I mean can I place it somewhere where no one can see it but still get all the analysis on the application ?You can use the mobile code for google analytic to make what you ask. h

ASP.NET calls a controller method of the master page?

In ASP.NET MVC2 how do you call a controller method from the master page? Say for example I wanted to include some overview data in the master: +--------------------------------------+ | Logo Welcome xyz| +--------------------------------------+ | to

Find FileUpload ID in javascript

I have several aspx pages and one site.master. I defined *.js file with any javascript functions. And now I want to find ID of FileUpload control on one of this subpage. function CheckFile() { var filePath = document.getElementById('<%= this.fileUp.C

Use an MVC Master page in a WebForm page

I have an MVC application that I am creating that I have to integrate regular WebForms into the site. The WebForm pages will be using a ReportViewer control so I believe that won't work in a regular MVC view because ReportViewer uses ViewState, etc.

JQuery with MasterPage in ASP.NET

I'm trying to use JQuery with some pages, that use master pages, and I'm having problems with loading the JQuery javascript file. When I include the file in the markup of the master page, it works just fine on pages that are in the same direc

ASP.NET MVC - How to design a H1 dynamic schema / title?

If i have an ASP.NET MVC 2 Web Application with the following Views: Main.aspx Page1.aspx Page2.aspx And all Views inherit from a MasterView called Site.master, I want to be able to have a default Title/H1 for the page, which can be overriden in the

What am I doing wrong in ASP.NET

Here is my master page code behind: namespace mysite.MasterPages { public partial class Main : System.Web.UI.MasterPage { public bool isLoggedIn; protected void Page_Load(object sender, EventArgs e) { isLoggedIn = Request.IsAuthenticated; // Is the u

Call method on the WebMethod master page

Or any viable workaround. So, imagine a Master page that implements IFooMaster with a method ShowFancyMessagePopupTheBusinessCantLiveWithout(string message); I am in a page that inherits this master page. Upon a checkbox being unchecekd, I want to sh

How can I use js files in master pages?

i have a master page. i try to add js files. vs editor is not draw green color. But no affect my pages with js. i can not use below js. How can i write src? (i can use pickurl) but i don't see effects of js on page <script src="Engineering/EngDyna homepage - make the hyperlink visible at runtime

Is it possible to alter the visible property of hyperlinks on a masterpage at runtime? thanksIf you expose the hyperlink as a property on the master page, you can get a reference to a pages master and cast that to your specific master page then set v

How to include the Javascript file in the Asp.Net page

I want to do some client side validation using javascript in ASP.NET page. I tried using <script src="../../../JS/Registration.js" language="javascript" type="text/javascript" /> but its not working. Please help.Probabl

How can I reference an ASP.NET MasterPage from App_Code

I'm working on a .net 3.5 site, standard website project. I've written a custom page class in the sites App_Code folder (MyPage). I also have a master page with a property. public partial class MyMaster : System.Web.UI.MasterPage { ... private string

Dynamic Modeling of the Main Model in ASP.NET MVC

I have the requirement to support different Master pages on my application (ASP.NET MVC). What is the recommended way to: Pass the master page name to the view from. Store the master page (in session, or something) so it sticks during a user's visit.

How to store an ASP.NET master page in a common library?

We would like to have several internal web applications which use the same master page. Is there a way to store a master page in a common library referenced by all projects?You can do this, but it is difficult and has quite a few drawbacks. This proc

Html.RenderPartial call from masterpage

Here is a scenario: Let's say I have site with two controllers responsible for displaying different type of content - Pages and Articles. I need to embed Partial View into my masterpage that will list pages and articles filtered with some criteria, a