CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

ASP.NET Web Hosting – 3 Months Free!



Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 3/25/2006 9:16:33 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 4 Views: 28 Favorited: 0 Favorite
5 Items, 1 Pages 1 |< << Go >> >|
[email protected]
Asp.Net User
Navigating from masterpage3/25/2006 9:16:33 PM

0/0

Hi,

Let's say I have buttons on the masterpage which I would like to use to navigation. How can I do that?

If I navigate the browser to the content page and press the master page button to change the content page, how can I do it form the masterpage code? I need all postback to be processed by the current content page.

dannychen
Asp.Net User
Re: Navigating from masterpage3/26/2006 5:25:03 AM

0/0

Hi,
  If I understand correctly, it sounds like you want the postback to be sent to a content page and you want to be able to redirect the users to another page.  Firsty, you'll need to hook into the click event handler of the button.  You can use FindControl to find the control in the masterpage and then add your own event handler. 

  Once you have the event handler hooked up, you simply need to call either "Server.Transfer" or Response.Redirect to navigate the user to another page.

It would be something like:

Page_Load:

   Dim b1 as Button = Ctype(Me.Master.FindControl("Button1"), Button)
   AddHandler b1.Click, AddressOf MyClickHandler

MyClickHandler:

  Response.Redirect("<newUrl>")

--
Danny


disclaimer: Information provided is 'as is' and conveys no warranties or guarantees.
[email protected]
Asp.Net User
Re: Navigating from masterpage3/26/2006 7:54:58 AM

0/0

Well the button is on the master page. The problem is, that the master page events are fired prior to the content page's, so if I redirect the request at the time Button_Click fires, the postback is not processed on the content page...

dannychen
Asp.Net User
Re: Navigating from masterpage3/26/2006 10:38:46 PM

0/0

Perhaps you can set a "flag" on your masterpage during the click event to tell it that it should do a Redirect/Transfer and then check the flag in PreRender on your masterpage.  This way the clicking will happen and you just defer the redirection.

--
Danny


disclaimer: Information provided is 'as is' and conveys no warranties or guarantees.
[email protected]
Asp.Net User
Re: Navigating from masterpage3/26/2006 10:58:42 PM

0/0

Thank you, I'm saving the desired url and doing a redirect if found during LoadComplete of masterpage. Is there any summary of all events and their order as they fire during the (perhaps mastered) page's lifetime and what is the developer intended to do with them?
5 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Macromedia Dreamweaver 8 Advanced for Windows and Macintosh: Visual Quickpro Guide Authors: Lucinda Dykes, Pages: 358, Published: 2006
Beginning ASP.NET 3.5 in C# 2008: From Novice to Professional Authors: Matthew MacDonald, Pages: 954, Published: 2007
Beginning ASP.NET 3.5 in VB 9.0: From Novice to Professional Authors: Matthew MacDonald, Pages: 1149, Published: 2007
Expert C# 2005 Business Objects Authors: Rockford Lhotka, Pages: 668, Published: 2006
C# for Programmers: Updated for C# 2.0 Authors: Paul J. Deitel, Pages: 1317, Published: 2005
Visual C# 2005: How to Program Authors: Harvey M. Deitel, Paul J. Deitel, Pages: 1591, Published: 2006
Visual Basic 2005: How to Program Authors: Harvey M. Deitel, Pages: 1513, Published: 2006
MCTS: Microsoft Office SharePoint Server 2007 Configuration: Exam 70-630 Authors: James Pyles, Pages: 617, Published: 2008
Microsoft Publisher 2007 for Dummies Authors: Jim McCarter, Jacqui Salerno Mabin, Pages: 366, Published: 2007
Beginning ASP.NET 2.0 in VB 2005: From Novice to Professional Authors: Matthew MacDonald, Pages: 1063, Published: 2006

Web:
Data Tutorial #2: Building our Master Page and Site Navigation ... NET 2.0 Master Page feature. And my site and link structure is nicely encapsulated by the ASP.NET 2.0 Site Navigation system, which I’m also using to ...
Master page postback/reload when navigating to different link ... Is it possible to have the master page not reload or do a postback when you click on a navigation link? I have a flash movie on the header and everytime i ...
ASP.NET Master Page - Disable Current Page Navigation : ASP.NET I have a master page file in ASP.NET 2.0 that is shared by many pages. It has a navigation bar at the top for the whole site to links to the Home page, ...
#19 of 40 Setup Master Page Navigation « China WBI Anyhow, the story was to implement a navigation menu, which intelligently only showed the appropriate menu items to users in particular roles. ...
ASP.NET Make Master Page Tutorial Part -8 (Bottom Navigation Links ... May 27, 2008 ... expression web asp.net master page tutorial navigation tools In the lower right hand corner of the screen you will see the Apply Styles box. ...
How to Create a SharePoint Server 2007 Custom Master Page and Page ... The following example code is the master page declaration section for a typical WCM site. If any custom controls are required such as custom navigation ...
Data Tutorial 2 - Building our Master Page and Site Navigation ... In this article, Scott examines how to build a master page and site navigation structure using ASP.NET 2.0 in a series of step-by-step demonstrations.
CodeProject: Inside Master Pages. Free source code and programming ... Now you are free to add any controls or code to your master page. You can add navigation controls such as TreeView or SiteMapPath , you can add a header and ...
MasterPage - ContentPlaceHolder - How to navigate to the ... Talk about MasterPage - ContentPlaceHolder - How to navigate to the ContentPlaceHolder "Child Page"
Treeview navigation and expansion/collapse issue in Master page ... Treeview navigation and expansion/collapse issue in Master page. Rate It (1). Last post 03-18-2008 12:55 AM by akjoshi. 3 replies. Sort Posts: ...




Search This Site:










content disapears??? css

findcontrol masterpage (possible brain-fart warning)

reference master page in separate project

how does a frontend web developer fit in to my asp?

menu+sitemap+menuitem click event event

last page access using asp.net similar to history.back(-1)

how can i call a javascript function on a menuitem of the menu control ?

treeview

sharing themes cross application

script source dinamic

need to make a call to master page function from inside of a dynamically loaded user control

tree view - not upto the requirements

reference asp.net page from a master page

errors after including master pages

changing property of a div tag of inherited master file

render aspx form from database record

communicating between master page and child(x3) page

how do you change the border color when mouse hover over a linkbutton?

how to switch themes from a page not at top-level

asp.net menu control

difference between masterpage and ifrmae

referencing js file in master page

cycling throguh root nodes.

is this possible with themes?

menu options visible to all after adding roles in sitemap

wizard control

css not working in firefox

masterpage updates

setting selecteditem in menu?

help on using themes

  Privacy | Contact Us
All Times Are GMT