[.Net 2.0] How to feed a master from a page ?

S

Steve B.

Hi,

I've build a corporate application that have a dozen of pages that use a
master page.

I'd like to add in each page a list of possible actions in a "task pane".
The design of this pane is common for all pages, but the tasks are page
specific.

What is the best way to reach my goal ?

By now, I think about adding a new content place holder embeded into the
design I want to reach, and in each pages, I add linkbuttons for each
actions.
However, this technic cause a problem: the contentplaceholder controls are
quite big in the designer and it does not reflect the result...

The other way I think about is to add a databound control but I don't know
if it is possible to move the datasource to each pages...


Thanks in advance,
Steve
 
E

Eliyahu Goldin

I would consider two options:

1) Databinding. Have the control for the pane in the master page. Make a
method BindTaskPane(Object meDataSource) on the master page and call it from
content pages passing specific datasources.

2) Have the control for the pane in the master page. Make a method
AddTask(myTaskClass myTaskObject) on the master page and call it from
content pages for every task record.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
 
G

Guest

Hi
steve
You can have a contentpalceholder and
build a user control with the links u required.
then place this user ctrl in contentpalce holder.

And for link buttons of the user ctrl create properties in user ctrl for
setting text and url of link buttons.And this properties will be set at time
of page load of individual page depending on task of that page.
 
S

Steve B.

Finally, since there is many possible controls (including one treeview, I
let the designer of each pages choose how this task pane is created... I
however keep the possibility to have two place holders, one with a managed
task list, the other with full control of content...

thanks,
Steve

Eliyahu Goldin said:
I would consider two options:

1) Databinding. Have the control for the pane in the master page. Make a
method BindTaskPane(Object meDataSource) on the master page and call it
from content pages passing specific datasources.

2) Have the control for the pane in the master page. Make a method
AddTask(myTaskClass myTaskObject) on the master page and call it from
content pages for every task record.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


Steve B. said:
Hi,

I've build a corporate application that have a dozen of pages that use a
master page.

I'd like to add in each page a list of possible actions in a "task pane".
The design of this pane is common for all pages, but the tasks are page
specific.

What is the best way to reach my goal ?

By now, I think about adding a new content place holder embeded into the
design I want to reach, and in each pages, I add linkbuttons for each
actions.
However, this technic cause a problem: the contentplaceholder controls
are quite big in the designer and it does not reflect the result...

The other way I think about is to add a databound control but I don't
know if it is possible to move the datasource to each pages...


Thanks in advance,
Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,778
Messages
2,569,605
Members
45,238
Latest member
Top CryptoPodcasts

Latest Threads

Top