Web Forms :: Put Two Different ContentPlaceHolder From Two Different ASPX Page In One MasterPage?

Mar 18, 2010

is it possible to put two different contentPlaceHolder from two different ASPX page in one MasterPage? Just like iFrame? if not what asp.net process/control can?

View 3 Replies


Similar Messages:

C# - Access Properties From Page In ContentPlaceholder In MasterPage?

Feb 10, 2011

I have following environment:

masterpage with a contentPlacholder multiple pages which use this masterpage and implement a base-class (fooPage) fooPage has a certain property (fooProperty)

[Code]....

Obviously this is not going to work - but how can I achieve this?

I know the alternative: call a method from the masterPage in the contentPage with fooProperty as a parameter - but i would like to rather have a pull-system in this case...

View 2 Replies

Web Forms :: Set Treeview Target To A Contentplaceholder In MasterPage

Jun 21, 2010

I have dynamically built my treeview by reading hierarchical data from database, I have divided my MasterPage like so:

<table width="100%">
<tr>
<td style="width:20%">
<asp:TreeView ID="root" Visible="true" runat="server" RootNodeStyle-ForeColor="BlueViolet">
</asp:TreeView>
</td>
<td>
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server"></asp:ContentPlaceHolder>
</td>
</tr>
</table>

When I click on one of my treenode, I need to set the node.target to the "ContentPlaceHolder1", ie, keep the tree menu as still and let the content page displayed at the right part of the page. However, the node doesn't seem to recognize the ContentPlaceHolder1.

2. I have tried using <frameset> with 2<frame> pages, this way, the node.target can recognize the frame id, code as below:

<frameset cols="25%, *">
<frame src="menu.aspx" name="Menu"></frame>
<frame src="Main.aspx" name="Content"></frame>
</frameset>

But, I need to check user's login permission, I did it with session("userId") variable and I ran into a problem that the session will only exists on the left frame(menu.aspx), not the content page(Main.aspx). I have tried both methods, but one way or the other, there is some function that I cannot accomplish.

View 1 Replies

Web Forms :: Open Link In Masterpage Contentplaceholder?

May 19, 2010

I have a master page that contains a menu, the menu contains links to pages outside the website, how do get those links to open up in the main contentplaceholder of the master page? I tried setting the target to the ID of the contentplaceholder but that didnt work.

View 2 Replies

Web Forms :: MasterPage Controls Resetting On Postback From ContentPlaceHolder Pages

Nov 18, 2010

Probably a simple fix to this I am not sure. Basically, I have a MasterPage that contains a Dropdownlist. This DDL controls what is displayed in ContentPlaceHolder. However, when postbacks are caused within the Contact Pages the DDL is resetting itself. How can I keep the selected value for the DDL between postbacks?

View 3 Replies

Web Forms :: To Create A Masterpage That Contains A Search Field / How To Display The Result In The Contentplaceholder

Mar 19, 2010

I'm about to create a masterpage that contains a search field, the result from the search should be placed inside a contentplaceholder, but how do I build that? I added the search form to the masterpage (not inside a contentplaceholder), and then I added the eventhandler for the button that trigger the search. Now lest say I want to display the result in the contentplaceholder, how would I do that?

View 4 Replies

Masterpage Reference Another With The Same Content And Contentplaceholder Tags

Jan 8, 2011

I currently have three masterpages and content pages in the following hierarchy: One root-level masterpage that displays the final result. Call this "A" Two sibling pages that don't reference each other but contain all the same contentplaceholder elements, just in a different order with different <div>'s surrounding them. Both reference the root-level masterpage. Call these "B1" and "B2". Several content pages that reference one or the other sibling master pages above (not both). Call these "C1" through "C-whatever".

Cn => B1 => A
Cm => B2 => A

This hierarchy works fine. Desired Setup What I want to do is add in a new level to this hierarchy (a new master page) between the content pages and the sibling masterpages. Basically so it's like this: One root-level masterpage that displays the final result. Two sibling pages plus a third sibling. Call it B3 A new middle masterpage that dynamically 'chooses' one of the sibling masterpages. The desired behaviour is to pass through the content given by C directly to Bn without modifying it. The only thing D actively does is choose which Bn. Call this new masterpage D. Several content pages that reference the new middle master page instead of the old siblings. The challenge to this is, I'm working within the confines of a rather complex product and I cannot change the original two sibling masterpages (B1 and B2) or content pages (C) in any meaningful way.

I want:

Cn => D => B1 => A
Cm => D => B2 => A
Ck => D => B3 => A

Essentially, D should "pass through" all it's content to whichever B-level masterpage it chooses. I can't put this logic in the C-level pages. Additional Details All B-level pages have the same content/contentplaceholder tags, just ordered and styled differently. D can be as convoluted as it has to be, so long as it doesn't require modifying C or B. I'm using ASP.Net 2.0

View 1 Replies

AJAX :: Refresh The ContentPlaceHolder , Not The Entire MasterPage When A Link Is Clicked On The TreeView?

May 5, 2010

I have an app that uses masterpages. On the masterPages I have a TreeView. I would like to only refresh the ContentPlaceHolder & not the Entire masterPage when a link is clicked on the treeView.

I have placed the contentplaceholder in an Updatepanel. I would like to if possible avoid including the menu in the update panel.

Using

VS2008 C#

AJAX Control toolkit Version 3.0.30512.20315

View 2 Replies

Pass Values From MasterPage UserControl To Child ASPX Page?

May 4, 2010

Senario: Masterpage with a UserControl and a child ASPX page

In the past when using this senario I've used an Interface as a way to pass a value from the UserControl (embedded in a master page) to the masterpage code behind then consume that value in the child aspx page.

My question is now that asp.net 4 have arrived is this still a good way to achieve this or is there another or perhaps better way to do it? I've read somewhere that perhaps "delegates" is perhaps another route to take.

View 1 Replies

MVC :: How To Show ViewData In Specific ContentPlaceHolder In Specific MasterPage

Feb 1, 2010

This is my Controller Action which takes a Page entity from database and shows it in the Show.aspx view using the "Site.Master" master page:

[Code]....

This is the "Show" view rendering "Page.Title" in the "MainContent" content placeholder:

[Code]....

And this is the "Site.Master"

[Code]....

Using this approach i can show "Page.Title" in Show.aspx using any master page that has a "MainContent" placeholder, but my real goal is if i can when i choose the MasterPage for that particular Page to also see a list of available ContentPlaceHolders and when i choose one to then render "Page.Title" in that particular ContentPlaceHolder.

View 4 Replies

AJAX :: JavaScript Function To Pass Value From MasterPage.aspx To Default.aspx And Then Refresh UpdatePanel

Feb 26, 2011

For example, I have master page MyMasterPage.aspx and content page MyDefault.aspx. I have many UpdatePanels at MyMaterPage.aspx, and also I have many UpdatePanels at MyDefault.aspx.

[code]....

I want JavaScript functionClickMenu(this) at input button [id="ButtonMaster1" @ MyMasterPage.aspx] pass its value ["Menu-1"] into text box [id="TextBoxDefault1" @ MyDefault.aspx], and then performing update / doing post-back to server ONLY FOR UpdatePanelDefault1.

I am looking forward an example code for JavaScript functionClickMenu(this).

View 4 Replies

Web Forms ::add Masterpage To Default.aspx?

Sep 10, 2010

I'm very new to .net and Visual studio. When u create a new website, a blank page default.aspx is displayed. Then u click on add new item & select master page. How to add this masterpage to default.aspx?

View 4 Replies

Web Forms :: See All The Content Of The Page In The ContentPlaceHolder?

Jan 14, 2010

i copied the html code from an aspx page from the tag <form> all the way down and paste it in the sorce of aspx page that bind with the MasterPage. now on the design view i need to see all the content of the page in the ContentPlaceHolder. it worked for 2 pages but in the thired page as i paste the html code the ContentPlaceHolder didnt reshaped itself to page size in the design its like spred all over the page. i'm working with visual studio 2005 asp.net c#

View 1 Replies

Web Forms :: How To Define Metakeyword In A Page With Contentplaceholder

Nov 24, 2010

I have a page which is linked with masterpage.

In my masterpage i have already defined metakeywords and description. But for one of my page i would like to define metakeywords and description which will be for that page only.

The metakeywords and desciption defined in master page is for the website.

Where and How to define metakeywords and desciption for any page which doesn't have <head> tag as it is linked with masterpage.

This is my About.aspx page code :

<%@ Page Language="C#" MasterPageFile="~/MasterPages/OneColumn.master" AutoEventWireup="true"
Inherits="Web.AboutPage" CodeBehind="About.aspx.cs"
%>
<%@ Register TagPrefix="MyTag" TagName="Topic" Src="~/Modules/Topic.ascx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cph1" runat="Server">
<nopCommerce:Topic ID="topicAbout" runat="server" TopicName="About">
</nopCommerce:Topic>
</asp:Content>

View 3 Replies

Web Forms :: Resizing ContentPlaceHolder In Master Page?

Aug 17, 2010

As the first step, I designed a Master Page for my website. Everything seems to be in order. My master page has a table say "Mytable" with 2 rows.

In the first row, I've put up a banner for the website.

In the second row, I want to place the ContentPlaceHolder.

The thing is that I can't make the ContentPlaceHolder to occupy the whole cell. I tried finding the solution through search engines and could not find out a solution.

In my web page, I want to create a table by Javascript. I mean that I want to make this table to occupy the second row of "Mytable". There is still some gaps left at the top and bottom of the ContentPlaceHolder.

View 5 Replies

Web Forms :: How To Get Gridview In Master Page Which Is Placed In ContentPlaceHolder

Jul 31, 2012

Looking to have a export button in master page. Gridview is placed inside panel, so I couldn't get the gridview to export to excel. I have gridview's wherein I can able to export to excel that are directly placed in maincontent (Content PlaceHolder). The problem is if gridview is placed inside panel I couldn't export.

protected void LinkButtonExport_Click(object sender, EventArgs e) {
foreach (Control ctr in MainContent.Controls) {
GridView gv = ctr as GridView; if (gv != null)
{ ExportUtil.Export("Test.xls", gv);
} else {
LinkButtonExport.Enabled = false; }
}}

View 1 Replies

Web Forms :: FindControl On Default.aspx In MasterPage.CodeBehind

Dec 11, 2010

I was wondering if it is possible to find a control in a standard web form that is using a masterpage.

So for example I have two pages - default.aspx and information.aspx. Both these web forms have label controls (lblDefault and lblInfo respectively). This information is stored in a database along with the content that the label controls should be populated with. Instead of having to program a method to retrieve the content text from the database for the relevent controls on these two pages would it be possible to find the controls in the masterpage codebehind file - something like Page.Form.FindControl("lblDefault")? So for each webform using a masterpage a check is done to see if any of the controls should be populated with content from the database.

View 2 Replies

Web Forms :: Creating Content For Each ContentPlaceHolder Of Master Page

Apr 13, 2010

I am searching the internet for possible solution for my problem, I have a page that sets the master page at runtime, my problem is how to create a content (asp:Content) control for each of contentplaceholder (that exists at design-time) in each masterpage?? I am looking at AddContentTemplate, but seems not working...

View 2 Replies

Web Forms :: When Clicking On A Link Would Like The Linked Page To Appear In The Contentplaceholder?

Jun 23, 2010

I have a masterpage that has a banner and under the banner it has a few links...The issue i am having is when clicking on a link i would like the linked page to appear in the contentplaceholder, i can't seem to figure it out.

View 3 Replies

Web Forms :: Display Menu Item Data On Separate Contentplaceholder On Same Page?

Jan 24, 2011

I have a aspx page with 3 contentplaceholders.

In contentplaceholder1, i have a menu with submenu items.

I need a functionality by which whenever i hover on any menu item or select any item it should display repective content in the contentplaceholder2

View 8 Replies

Web Forms :: Accessing Control Name Inside A Contentplaceholder In Master Page Using Javascript

Apr 26, 2010

I have a asp.net webpage which is using an Master page and contentplaceholder.

My Req: I want to access the control name through javascript.I have tried to use 'document.forms[0].elements[i].name' but its giving an error since my page there is no form.Only master page and contentplaceholder.

View 1 Replies

Master Page Needs To Know If A ContentPlaceHolder Hasn't Been Used By Current Content Page?

Aug 13, 2010

I have a master page which has several ContentPlaceHolders. Not all of them are used by the current content page all the time. During page rendering the master page needs to set a property when a ContentPlaceHolder wasn't used by the current content page. Meaning a ContentPlaceHolder might not be referenced by the content page.What's the best way for the master page to iterate through its ContentPlaceHolders and find out which ones haven't been used by the current content page? Looking for a solution that does not involve any communication from content page to master page.

View 2 Replies

Web Forms :: How To Write Aspx Page HTML From Aspx.cs Page On Page Load

Dec 1, 2010

i want to write aspx page html from aspx.cs page on page load..

i hav already used div.innerHtml...

i want to write below code in aspx page from aspx.cs page

[code]....

View 5 Replies

MVC :: Putting Asp Page Into Contentplaceholder?

Apr 24, 2010

I'm incorporating some parts of an old asp application into a newly written mvc app. In most places I've separated out the data access and business logic into the model, and written new view's and viewmodels on the mvc side, although what I ended up with was not perfect, it works reasonably well.There's one area that's probably a bit too much work to do that. It uses an asp treeview and custom controls, and has lot's of code that just isn't partitioned very well. It's one of those 'well I wouldn't start here' situations, but unfortunately it's the code I have. As an application in it's own right it works well and has done for the past 5 years or so. Although it does want re-writing, that's probably more work than I wanted to do right now if I can get away with it.

The asp pages decend from a custom asp page, which itself decends from asppage and contains a custom DAL. What I'd really like to do, is 'paste' the page produced by this legacy asp page into the 'main' contentplaceholder area on an mvc form. I know I can incorporate standard asp pages into an mvc application, but that isn't what I'm trying to do as I want to use the master page from the mvc application.

View 2 Replies

Conditional ContentPlaceHolder In Master Page?

Jun 24, 2010

I have two master pages in my project, one for web views and another for emails. In the web master page is a placeholder to put page specific JavaScript, if a page is using this and I try to programmatically change the masterpage to send as an email the server falls over as it can't find the placeholder.

Is there a way to change the behaviour so that if a placeholder can't be found it just doesn't include that bit? I'm thinking maybe on my page base class looping over a collection of placeholders and content tags and removing the ones that don't match up, but I'm not sure if there's a good point in the page lifecycle to do this.

I'm using MVC not WebForms if this makes a difference.

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved