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


Similar Messages:

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

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 :: 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

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

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 :: Open 2 Pages In Two ContentPlaceholder?

Feb 10, 2010

I have added two contentplaceholders on my master page.

My Treeview navigation is on the master page. When i Click a link on treeview a parameter page (Para.aspx) must be loaded on Contentplaceholder1 and When i click preview button on parameter page (Para.aspx) report must be loaded in to contentplaceholder2 on master page.

View 6 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

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

Open Pdf Within Iframe In Contentplaceholder?

Apr 26, 2010

im working with asp.net 2.0 and im using master pages.i have a link to a pdf file...when i click on the link i want the pdf to open within the contentplaceholder.im using iframe within the content placeholder.my master page code is below:

[Code]....

i want the citizen_chart.pdf to open within the iframe....the other links open in the content placeholder. each of the other pages reference the master page,so all the links are seen in every page.so whenever i click on the citizen charter lik the pdf should open in the iframe within the contentplaceholder.

View 3 Replies

Web Forms :: Reference To LINK Tag (css) In MasterPage From ContentPage?

Apr 24, 2010

I have applied my stylesheet in my masterpage the following way:

[Code]....

In my contentpage I wish to change the stylesheet of my masterpage, but I'm not sure how to reference to it.

I've tried the following, but I can't scope to the "test".

<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
test.Href = "~/CSS/AlternativeMenu";
}
</script>

View 3 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

Web Forms :: Header In Masterpage - Bold The Link When Active?

Apr 13, 2010

I am developing my first website, the functionality is done, now i am trying to "make it look better", but i have no experience with html.

In my project i have a masterpage.master which includes a header.ascx and all of my pages have the same master page set. In my header i have the links to all of my pages so no matter where i am, i can chose to go on which page i want. I attach the source i have in my header.ascx.

Now, what i would like is when i click the link and the wanted page is loaded, the link status to be changed to bold. Until now, when i click is made bold, but i think because on click is loaded the requested page, which has the same masterpage, so the same header, the link status is changed back to original.

How do you handle this? Not put the header in master page, is no use of header...my logic ...is this something hard to accomplish? Where did i went wrong?

[code]....

View 7 Replies

Open A File Share Link From Window.open Javascript?

Aug 2, 2010

I am trying to open a file share link from the window.open ... but its adding the http://localhost/vdir/ before the path can any one say what is the problem?

View 1 Replies

Web Forms :: Open Link With Aspx?

May 2, 2010

I have a Link in my Gridview and when i click it i want it to open in a page with certain "design".

I want when i click the link to take its ID and pass it over the handler.

Like for exaple clicking on a news Title and open the article to view the entire article.

View 7 Replies

Web Forms :: How To Open Link In New Tab In All Browsers

Oct 18, 2013

How to open link in a "New Tab" in all the browsers, after clicking on Image button ?

The code that i used opens link in new browser window, but i want it to open in new tab.

View 1 Replies

Web Forms :: How To Open Link (URL) In Other Window

May 7, 2015

I am using an asp:button to open a url link :

protected void redirectTo_OnClick(object sender, EventArgs e) {
Response.Redirect("http://www.google.com");
}

This link open itself in its own window , i want it to be opened in other window just link we do in html

< a href="google.com" target="_blank"></a>

How to do this in c# ?

View 1 Replies

Web Forms :: How To Open A New Window Using Link Button

Feb 9, 2010

I am trying to navigate it to another page using Link Button and in the .cs file, I am using Response.Redirect. But I want it to the open in a new window.

The reason why I cant use hyperlink is I cant use Command Arg and Command Name which I am using in the Link Button.

I tried the below Javascript, But it's coming as a pop up for the first time when it loads. I don't want it in that way also.

Is there a way like Hyperlink '_blank'.

public static void OpenNewWindow(string url, Page thispage)
{
string fullURL = "window.open('" + url + "', '_blank', 'fullscreen = no, status=yes,toolbar=yes,menubar=yes,location=yes,scrollbars=yes,resizable=yes,titlebar=yes' );";
ScriptManager.RegisterStartupScript(thispage, typeof(string), "OPEN_WINDOW", fullURL, true);
}
.cs
<asp:LinkButton ID="lbtn_photo" runat="server" Text="Upload Photo"
OnClick="Upload_Photo"></asp:LinkButton>
protected void Upload_Photo(object sender, EventArgs e)
{
Response.Redirect("UpPhoto.aspx?id=" + Request.QueryString["id"]);
}

View 8 Replies

Web Forms :: How To Open Link To Pdf File In New Tab Using HTML

Jun 1, 2010

I have an html page which contains link to open pdf file. however this link opens in adobe reader when i click on it. I have set target property to blank. but it doesnt work either. I want to open this pdf file in new tab in the same window.

View 6 Replies

Web Forms :: Open Excel File From Link?

Mar 1, 2011

I have a requirement where i need to open excel file from system using link

i build link from code <a href="path fo file">

but this does not work from aspx page

if i put same thing in seperate html page nd run it works fine

View 6 Replies

Web Forms :: Open A Ppt When Link Button Is Clicked?

May 18, 2010

I have a ppt in a folder Rocky and i am doing something like this :

this.btnSmartQuoteTutorialVideo.OnClientClick = "OpenMaximizedWindow('Tutorials/Paoli/PaoliSmartQuoteTraining.ppt'); return false;";

View 8 Replies

Web Forms :: Open A New Tab In Iframe Using A Link Button?

Nov 30, 2010

I have an iframe inside that there is a linkbutton if i click it should open a new tab in that browser,or Unblockable POPup's. I cant change it into other controls like Hyperlink or <a> tag, coz i am doing an DB updation in that linkbutton click event also passing values in query string.

View 7 Replies

Web Forms :: Open In A New Tab On Image Or Link Button

Aug 27, 2012

I want when any user right click on Image button or link button on my website at that time I want him to show open in a new tab.

The event has been created on Datalist_Itembound event and from their I am redirecting user to another window.

View 1 Replies

MVC :: Change A Link In A MasterPage Based On Current View?

Jan 14, 2011

Is there a way to dynamically build an action link in a Master Page depeding on the View iteself.

For example, if I am at View1, I want the link in the Master PAge to point to an action A; whereas if I am on View 2, I want the link in the Master Page to point to an action B.

View 4 Replies







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