473,785 Members | 2,767 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASP.net 2 Master pages menu and saving pages - Weired situation - please help

Hi guys,

I am having a weired situation that don't know how to handle it ...
I have master pages, the master page contains a dynaic menu which is set up
in the database
and has page url, name, title etc.

The menu is loaded dynamically at run time. The problem that I have is that
once the users are selecting
any menu option (eg a link) i should manage to save current page content and
if the save was successful
then I need to redirect to selected page otherwise display the message ...

In this stage I have a base class (basepage) that all my pages inherits
from, and I also have an interface
IManageable that the base class implements it.

However, I am not sure how to implement this situation? How selection of one
menu option can save
the previous pages details (if any) then navigate

Any suggestion will be appreciated
Apr 23 '07 #1
4 1605
Here is my first go at this:
The menu has to use ASP.NET link buttons instead of a direct postback. You
can then capture that event and save the data. This can be a generic
routine, in the base class, that you can call a method to save. If you need
to override this event in the page itself (extremely likely), you can do
that.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*************** *************** ***************
Think outside the box!
*************** *************** ***************
"Annie" <my************ **@gmail.comwro te in message
news:46******@d news.tpgi.com.a u...
Hi guys,

I am having a weired situation that don't know how to handle it ...
I have master pages, the master page contains a dynaic menu which is set
up in the database
and has page url, name, title etc.

The menu is loaded dynamically at run time. The problem that I have is
that once the users are selecting
any menu option (eg a link) i should manage to save current page content
and if the save was successful
then I need to redirect to selected page otherwise display the message ...

In this stage I have a base class (basepage) that all my pages inherits
from, and I also have an interface
IManageable that the base class implements it.

However, I am not sure how to implement this situation? How selection of
one menu option can save
the previous pages details (if any) then navigate

Any suggestion will be appreciated
Apr 23 '07 #2
Personally, if I wanted to do something like this, I'd just use some
client-side code to ask the user to confirm leaving the page if data has
changed. But, if you want to just automatically save the stuff, then your
nav links in your master page will have to be linkbuttons which will post
and execute whatever code is necessary in each of your pages in the
Page_Load in an if(Page.IsPostb ack) block.

Ray at work

"Annie" <my************ **@gmail.comwro te in message
news:46******@d news.tpgi.com.a u...
Hi guys,

I am having a weired situation that don't know how to handle it ...
I have master pages, the master page contains a dynaic menu which is set
up in the database
and has page url, name, title etc.

The menu is loaded dynamically at run time. The problem that I have is
that once the users are selecting
any menu option (eg a link) i should manage to save current page content
and if the save was successful
then I need to redirect to selected page otherwise display the message ...

In this stage I have a base class (basepage) that all my pages inherits
from, and I also have an interface
IManageable that the base class implements it.

However, I am not sure how to implement this situation? How selection of
one menu option can save
the previous pages details (if any) then navigate

Any suggestion will be appreciated
Apr 23 '07 #3
The only downside here is if you use autopostback instead of AJAX on certain
controls (dropdowns that populate other controls comes to mind). If you
always have IsPostBack = true save the data, you will have to have a
validation routine to avoid saving half eaten data.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*************** *************** ***************
Think outside the box!
*************** *************** ***************
"Ray Costanzo" <my first name at lane 34 dot commercialwrote in message
news:65******** *************** ***********@mic rosoft.com...
Personally, if I wanted to do something like this, I'd just use some
client-side code to ask the user to confirm leaving the page if data has
changed. But, if you want to just automatically save the stuff, then your
nav links in your master page will have to be linkbuttons which will post
and execute whatever code is necessary in each of your pages in the
Page_Load in an if(Page.IsPostb ack) block.

Ray at work

"Annie" <my************ **@gmail.comwro te in message
news:46******@d news.tpgi.com.a u...
>Hi guys,

I am having a weired situation that don't know how to handle it ...
I have master pages, the master page contains a dynaic menu which is set
up in the database
and has page url, name, title etc.

The menu is loaded dynamically at run time. The problem that I have is
that once the users are selecting
any menu option (eg a link) i should manage to save current page content
and if the save was successful
then I need to redirect to selected page otherwise display the message
...

In this stage I have a base class (basepage) that all my pages inherits
from, and I also have an interface
IManageable that the base class implements it.

However, I am not sure how to implement this situation? How selection of
one menu option can save
the previous pages details (if any) then navigate

Any suggestion will be appreciated
Apr 23 '07 #4
Hi guys,

I guess the problem I am having and can't figure out is that the Menu is
generated dynamically
it very possibly could be a treeview ... then I need to make sure that once
the link is clicked
if there is unsaved object then it should be saved ... then it should
redirect to new clicked page
each page can have its own BOC but they all hopefully will have a base class
....

I just can't set the object hierarchy and how the commuicate with the menu
and master pages

thanks for any tips
"Cowboy (Gregory A. Beamer)" <No************ @comcast.netNoS pamMwrote in
message news:34******** *************** ***********@mic rosoft.com...
Here is my first go at this:
The menu has to use ASP.NET link buttons instead of a direct postback. You
can then capture that event and save the data. This can be a generic
routine, in the base class, that you can call a method to save. If you
need to override this event in the page itself (extremely likely), you can
do that.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*************** *************** ***************
Think outside the box!
*************** *************** ***************
"Annie" <my************ **@gmail.comwro te in message
news:46******@d news.tpgi.com.a u...
>Hi guys,

I am having a weired situation that don't know how to handle it ...
I have master pages, the master page contains a dynaic menu which is set
up in the database
and has page url, name, title etc.

The menu is loaded dynamically at run time. The problem that I have is
that once the users are selecting
any menu option (eg a link) i should manage to save current page content
and if the save was successful
then I need to redirect to selected page otherwise display the message
...

In this stage I have a base class (basepage) that all my pages inherits
from, and I also have an interface
IManageable that the base class implements it.

However, I am not sure how to implement this situation? How selection of
one menu option can save
the previous pages details (if any) then navigate

Any suggestion will be appreciated

Apr 24 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
2406
by: multiformity | last post by:
So I have been working on an opensource project for a while, and decided to really try to make it look better after focusing on the functionality most of this time. Up to now, I have simply used a standard ASPX page with minor modifications to it. All of my pages inherit from a "BasePage.cs" class, that handles common things like getting the user's information out of the session, determines if a page should or should not be password...
17
3161
by: Rob R. Ainscough | last post by:
Again another simple concept that appears NOT to be intuitive or I'm just stupid. I've read the WROX book and the example doesn't actually show how the .master page links in the other content pages? Kinda sorta a critical point no? Am I missing something? Rob. P.S. the day I find a book that actually is useful rather than just a
6
1879
by: Ben Fidge | last post by:
Hi I've just created a new Master Page for my site and it uses the native Menu control. Strange behaviour is happening on page that use the master page. For some reason, the menu controls rendering is totally out. Instead of nice "fly-out" menu's, the menus are all dumped underneath the static level menu items when the page first loads. Hovering the mouse over one of the static items re-renders the menu as it should look, but then the...
4
2195
by: Janet | last post by:
Hi, I'm trying to use the master/detail page to display the information of staff. The master page will display some general information, while the differen detail pages will show the different kinds of staff details, like family member details, contact information, etc. Hence, this case, I'll have - Staff.master - Family.aspx
2
2574
by: n# | last post by:
I have an old existing website with a Header/ Left Hand Menu and a iframe as the main body content, adjacent to the menu. So for every click on the menu item, I used to load a aspx page on the iframe and hence i am not loading the entire menu and header for each request. When I try and port the above model to Master Page 1) The menu ( I thot of having the Menu Web control), Header would be moved to the master page.
0
1021
by: Miaaa Mukherjee | last post by:
I m using ASP.Net with VB,C# in 2005 I want to use the master page and content pages. I m creating a project which contains a leftmenu,headercontrol of images,middle menu. I don't understand what to do and how can i put the contentplace holders on the forms. I want in each and every forms the header control which contains the images but the middle menu and left menu changes as the login procedure the rights for admin and normal user...
3
2747
by: Adi | last post by:
Hi all, I have a menu which is placed in the master page. Now when the user clicks on one of the menu item, it fires an event which is handled in the master page. I need to know from which page the menu item was clicked is there any way i can get the id of the page and verify it or is there an alternate way to do it. I have recently started using master pages in my website. previously I was having the menu control in a web user...
10
2146
by: =?Utf-8?B?RGFuaQ==?= | last post by:
Hi, Trying to create a master page that holds a menu, and the menu switches between pages in the site. 2 problem arrosed: a. When I navigate from page to page (all AJAX Web Forms, with the Master pages as their master...) the entire page is refreshed - also the menu which belongs to the master, how can I fix it - so only the inside content will be refreshed ?
5
3876
by: Murray | last post by:
Forgive me if this question is too basic, but I'm new to ASP.NET programming, and I can't locate a simple answer to this question. I have a web page that consists of a Master Page and a single contentplaceholder. The master page has a menu bar in it. How do I change the web page that is displayed in the contentplaceholder when I click on a menu item on the master page? It seems like this should be pretty basic, but I can't discover how to...
0
9645
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10329
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10152
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10092
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9950
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5381
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4053
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2880
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.