Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 3.5 > ASP.NET 3.5 Professionals
|
ASP.NET 3.5 Professionals If you are an experienced ASP.NET programmer, this is the forum for your 3.5 questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Professionals section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 31st, 2010, 11:22 AM
Authorized User
 
Join Date: Mar 2009
Posts: 74
Thanks: 5
Thanked 0 Times in 0 Posts
Default Please I need some help on usercontrols, thanks...

I want to create an application with a master page

After that, i want it to have just one page.This page inherits the master page .and has functionalities including add customer, delete,update etc. These functionalities are accessed by clicking on the desired
option on a menu control.

however, the problem is that I want all of these funtionalities not on seperate pages
but on seperate user controls that are being loaded dynamically into the page's placeholder control
I want to access these functionalities by the click of menu buttons located on the left side of the page.

I understand how to accomplish this task when am not using user controls but placing the functionalities on
seperate pages and using a sitemap to create the menu.

But it is how I could create a menu control to load these webuser controls dynamically into the placeholder that is giving me a problem.
since I cannot use a sitemap with webusercontrols.


I would also like to restrict the list of options on the menu control based on the role of the currently logged in user.

What I am trying to achieve is to make my application seem like a desktop application,which is why I do not want trips
to other pages but intsead use web user controls and ajax to load into a place holder control, the desired page functionality
such as add record, update, delete etc.

Please I'd apprrciate some detailed assistance,ideas,advice including code in c sharp if possible, thanks.

Last edited by ysfkay; January 31st, 2010 at 11:31 AM..
 
Old February 2nd, 2010, 02:57 AM
Friend of Wrox
 
Join Date: Jun 2007
Posts: 477
Thanks: 10
Thanked 19 Times in 18 Posts
Default

I'm not certain how to solve your specific question, however, I do have some thoughts about how you might rework your design to improve the quality of your application and eliminate the problem you're experiencing.

While some of the guys who are component masters may be able to help you hack this functionality, I don't usually think of a contentplaceholder as a way to swap content in and out for "one page". The entire point of a master page is to encapsulate the XHTML which is consistent across all pages of your website so while it let's you swap out content from page to page, the situation you note is a little different. You don't really gain anything by using master pages in your situation.

Also, while AJAX and Flash have made it very trendy to build one-page applications with all sorts of functionality built in (printing, bookmarks, linking, etc.) I've never like that application architecture. These are all features that are built into browsers much more flexibly and efficiently; it's also functions that are standardized through the browser making them much more intuitive for your users because they do "exactly" the same things on every website to make them work; your application will need to reinvent the wheel and it will still be confusing for people because they'll have to learn how to make things work the way they want on your site from scratch. A one page website, is quite literally impossible to navigate and impossible to bookmark effectively.

I'd recommend leveraging the advantages of master pages to build a multi-page site. It will eliminate your current problem entirely, because you will simply build each function into a separate content page. The template code in the master page and the styling in the CSS will still make it appear that they are on the same page if that's how you set it up. So you can achieve the same effect. Moreover, people will be able to bookmark the page they need if they have to stop part way through the process, and you can navigate people around the site normally with links or using page redirects which are well documented across the net. I think that's a much better way for you to pursue this application than trying to manufacture complicated new code and figuring out a way to shoehorn a solution into it. I really think this is an application design issue, not a lack of code.
__________________
-------------------------

Whatever you can do or dream you can, begin it. Boldness has genius, power and magic in it. Begin it now.
-Johann von Goethe

When Two Hearts Race... Both Win.
-Dove Chocolate Wrapper

Chroniclemaster1, Founder of www.EarthChronicle.com
A Growing History of our Planet, by our Planet, for our Planet.
 
Old February 2nd, 2010, 05:41 AM
Authorized User
 
Join Date: Mar 2009
Posts: 74
Thanks: 5
Thanked 0 Times in 0 Posts
Default This

Thanks alot, I understand what you mean...
I think instead of making the whole site work this way,
I will make the admin section alone work this way...





Similar Threads
Thread Thread Starter Forum Replies Last Post
Usercontrols yveerabhadrarao ADO.NET 1 August 3rd, 2007 06:57 AM
Javascript in UserControls chakravarthy_vb Classic ASP Components 1 March 30th, 2005 06:35 AM
Linking UserControls dhanyavnair Pro VB 6 2 December 1st, 2004 02:41 PM
Postback for usercontrols anuradha80 General .NET 4 September 27th, 2004 11:35 PM
Reusability of UserControls jara VS.NET 2002/2003 0 August 14th, 2003 05:52 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.