Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP.net 2 Master pages menu and saving pages - Weired situation - please help

Reply
Thread Tools

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

 
 
Annie
Guest
Posts: n/a
 
      04-23-2007
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


 
Reply With Quote
 
 
 
 
Cowboy \(Gregory A. Beamer\)
Guest
Posts: n/a
 
      04-23-2007
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>


 
Reply With Quote
 
 
 
 
Ray Costanzo
Guest
Posts: n/a
 
      04-23-2007
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.IsPostback) block.

Ray at work

"Annie" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>


 
Reply With Quote
 
Cowboy \(Gregory A. Beamer\)
Guest
Posts: n/a
 
      04-23-2007
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 commercial> wrote in message
news:(E-Mail Removed)...
> 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.IsPostback) block.
>
> Ray at work
>
> "Annie" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> 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
>>

>


 
Reply With Quote
 
Annie
Guest
Posts: n/a
 
      04-24-2007
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)" <(E-Mail Removed)> wrote in
message news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> 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
>>

>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cross Page Post Back When Using Mixture of Master Pages and Non-Master Pages Jason@webbit.com ASP .Net 1 05-16-2006 02:00 PM
Weired problem with site-to-site vpn: only one side of the vpn works !? Dirk Westfal Cisco 5 03-14-2006 09:35 PM
seeking servlet "Master" keep getting "Master/servlet/Master" not found. Tomcat 5.0.25 Doug McCann Java 1 08-05-2004 09:16 PM
Server.Transfer in ASP.NET - weired problem Nedu N ASP .Net 1 01-21-2004 12:51 AM
HELP! weired problem Brian H Computer Support 6 01-03-2004 02:11 AM



Advertisments