Can Other Project Areas Use One Master Page Or Does Each Have To Have Their Own Master Page
Feb 12, 2010
For those who setup muli project areas in ASP.NET MVC 2 in VS 2010, I have a few questions for you:
Can other project areas use one master page? Or does each have to have their own master page?
What about the web.config file? Does each area need the config file? Or does it rely on the master?
I tried removing the master page reference, but I get an intellisense error and failed to monitor changes after following this: [URL]
I assume I need to leave in the master page so that at least works.
I have a master page containing a tree and 3 dropdown lists. I am populating a context menu on right click of each node, and when clicked on any item of the context menu, it navigates to required pages.
My problem is after navigating to the required page, the selected values from the drop down lists and the selected node from the tree are getting cleared.
I can set the selected values for the dropdown lists by making some properties in master page. But how do i maintain the selected node?
In my content page, i have got the valuepath of the right clicked node.
Or is there any other way than setting the properties in master page?
I have a master page setup that is used throughout my site that is basically a header with a menu. I recently added a textbox and a button to this master page which is to be a quick search box that is available anywhere in the site. When a user enters text into the search box and hits the button, I need to load the actual content page which is used to search and show search results (which also uses this same master page), and have the text entered available so the search can be triggered automatically. Again, this search text box and button is now in my master page so it could be triggered from anywhere in the app... it serves as a convenient way to do a basic search from anywhere in my app, without having to first navigate to the actual 'search page' that already exists. You can also navigate to the actual search page, which uses the same master page, where there is many more search options.I'm thrown off by the master page arrangement, which I have not used until this project. What do I do?
Is it possible to inherit a sharepoint master page(as a parent) in another application's master page which will be treated as child (i.e. after integrating that standalone application with the sharepoint application)? I am totally new to Sharepoint..
We have two projects. One is in MVC and the other is the traditional Asp.Net project. We are trying to share a common Master Page for both the projects. The Master page for the MVC project is already using a form tag with runat="server" attribute because it's using a traditional ASP.Net control for the navigation menu. The ContentPlaceHolder is outside this form.
UPDATE: Found the answer here: [URL] <form id="Form1" runat="server"> ....... <asp:ContentPlaceHolder ID="MainContent" runat="server" /> </form>
looking for information on how to do this. our company has one website, with several different applications. the way we have set it up is that we have been creating these different applications as websites, we have one Master page for the whole site, so when we create a new website we also create a virtual site with our master page in it. We are using VS 2008 now and what we want to do is make the change to creating web applications but I have not been able to figure out how to bring our master pages into the application, without bringing the actual pages into the app. the only thing I have been finding is people creating the master page file in the web application, that will not work for us, as we have to many applications and if there is a change in the master page it has to show on our whole website, so we need to either be able to bring our master page in as another project or set it up as a virtual directory, or reference it in the web.cofig somehow, but the master page needs to stay in it's own directory and only referenced.
I am trying to add a .aspx page in the project , but while adding the .aspx page i am not getting the option to choose existing master pages. I remember long back i used to get that option to select the master page.
I'm trying to dynamically change the look of my main master page depending on what nested master page that the current content page is using .
So for example.
Main master page = main.master My nested page = nested.master (uses main.master) content page = content.aspx (uses nested.master)
So in the Page_Load event of main.master I want to add a switch statement that will check to see what nested master page is currently being used by content.aspx, or whatever content page is loaded.
So far I have got
protected void Page_Load(object sender, EventArgs e) { string nMaster = //This is the line of code that I am looking for. switch(master) { case "nested.master": //all my logic here. break; } }
I have a 3 level nested master pages and a content page. parent1 is the top parent, parent2 is parent of parent3 and parent3 is the parent of the content page.
I get an error 'Cannot find ContentPlaceHolder xxx...' where xxx is a ContentPlaceholder. It resides in parent2 and content page is trying to fill it.
Can content pages only use their direct parent ContentPlaceHolders or can they also use any of the higher master pages?
How to access controls in master page using javascript? The master page consists of a search textbox, on key down event of the control I call a javascript function writtern inline of the master page. I get the value of entered in textbox in that javascript function. I have tried giving document.getElementById("<%=txtSearch.ClientID %>").value as well as document.getElementById("txtSearch").value. Both display error. I have to access the textbox control from within the master page itself!
I have a question about master page.After i pushed button i would like to change my master page to another master page for that page, is that possible?
I got a Master page and nested master pages in the subfolders.
Top Level Master page
Second Level Master page inherited Top Level Master page
Third Level Master page inherited Second Level Master page
However, changes (i.e. new images & alt. name) that I made in the Top level master page did not apply to the second or third levels.My webpage has a correct front page but not in the sections. How can i correct this ?
I'm starting with ASP.NET MVC (1.0). I have a problem to resolve. I have developed a web applicaton (an application of articles like e-commerce) with a head (logo and menu). I have defined the head (logo and menu) in the Master page (site.master). Now, I must display the number of articles in the head in a field (like the number of articles in the virtual basket in the e-commerce). I can read the number of articles in the data base (in the controller), but i can't integrate it in the master page.
I am working on masterPage/sub masterpages, all worked fine until this morning.When I open a .aspx which uses masterpages, in the design view it shows the error message..
I've checked both master pages several times, all tags are matched and visual stuido itself doesn't indicate any errors. Also in debug mode the html page is generated without any problems..
My computer system froze on me, the mouse froze, cntrl-alt-del, did nothing, so I reset it. Did a disk check, and now everything seems fine except for my master Page html code which I was in the middle of editing when it happened. The VB code-behind file is still ok, the designer file still shows ok with all of the controls in it, but I can't get into desgn or source view. It just opens and gives a whole page of hesixecimal code such as as:
here i wan to call nested master page from my base master page, can it work?
coz when i add new nested master page, it allow me to add and when i show in design of nested masterpage, it will link together,but how i make a button in master page to view the nested master page in master page's contain.
I have a textbox and a button, and I trying to give the user a search option in the master page. The onClick event of my button is fine, but the textbox.Text property is always empty. I googled a little and fine many articles about accessing the Master from the ContentHolder, but I believe its no my case...
I am working on a functionality of user right, in which admin is selecting the pages and the user and save it. so whenever that user will login into the system then he will be able to see only those pages which were selected and saved for him by the admin.
now for that i have created one page for the list of pages of the application and user list and i am storing them into the database. and then to hide and show the panels i have created the BaseWebPage in my application but here i am not able to get the master page to hide the panel and show only those which are permitted. i dont have much knowledge of BaseWebPage. i am working in framework 2.0 and i have links of all pages that i have shown in a master page in a panel.
I have an "Edit" page that uses a FormView bound to an EntityDataSource. The page is called with the ID field of the record to edit in the query string: "EditEmployee.aspx?ID=10". The EDS the FormView is bound to is using: AutoGenerateWhereClause=true and a QueryStringParameter. Below the FormView I have a ListView that contains some child records of the FormView. The ListView is bound to a seperate EDS and also uses the (same) QueryStringParameter.
The problem I am having is when this ListView attempts to Insert or Edt a column I receive an error because I don't have the ID field (EmployeeID) of the parent bound anywhere in the ListView (and obviously, it is setup as a ForeignKey so it fails, like it should). Any advice on the best way to get this ID (EmployeeID) column bound in the ListView? There are many things I can do in code behind, but I would like to solve this in the markup if possible. I can move the ListView so that it is inside of the FormView if necessary.