Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Convert traditional ASP.NET design approaches to DNN. Thoughts appreciated! Convert traditional ASP.NET design approaches to DNN. Thoughts appreciated!
Previous
 
Next
New Post
10/22/2008 8:47 AM
 

Hi All,

I am an experienced asp.net/vb dev and have just started moving over to using DNN for our CMS system and I just wanted to see if I could tap you guys up for some advice on some general design issues that have been perplexing me! Your patience is appreciated!

So, in a 'normal' .net application, let's say I have a list of products. Normally, I would have a db table of products which I would push into a specific page, say Product.aspx. This would be a generic page for all products with some specific layout/control set for displaying my products. The specific product data would be populated based upon a unique id from the querystring or passed page values or whatever. Then, I could use the DB table to populate each product as a menu item which would then redirect to product.aspx?id=3 or whatever. Simple.

In DNN, what could a potential solution to this paradigm be? I figure I could build a product viewer module and drop that on a page called 'view product'. What is perplexing me is, would I have to create a specific page instance for each product each time I add one in order to get the menu item functionality? Obviously, this doesn't lend particularly well to quickly adding products, especially if the process is given over to a client to perform.

It is these kind of issues that I would love to chat to you guys about and get some best practise tips on the how to use DNN effectively while still leveraging my own existing skills in the ASP.NET area.

Any help would be very much appreciated!

Tom Warner

 

 

 

 

 
New Post
10/22/2008 9:32 AM
 

you can have all in a single module with list and detail view, like in UserDefinedTable module, when you enable custom Skin with Master&Detail option.


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
10/22/2008 9:45 AM
 

Sebastian,

Thanks very much for your reply!

While that answers my question partially, how do you propose this would work in regards of populating a list of entities and then linking to the detail view? Or you would have to do it all manually?

Again, all comments and suggestions greatly appreciated!

 
New Post
10/23/2008 10:05 PM
 

Tom

You're on the right track.   For your products page question, the answer is you want to build a products module.   This module would contain a couple of user controls.  An imperfect way of changing asp.net thinking to DNN thinking is to think of asp.net pages == DNN module controls.  Where you would build one asp.net page to handle products, you'd build one DNN Module to handle products.

Now, within your products module you're going to need a couple of things:

- a product view page

- a product edit page

- a product list page

Within your DNN Module, you'll have three controls (at least)

- productview.ascx

- productedit.ascx

- productlist.ascx

You will structure these modules into your overall module package so that only authorised users can 'see' the edit page and thus change the product information.  Then, when you're ready to drop the module onto a DNN page, you will set up some basic module settings.  For the scenario where you have the list on one page and the detail on another page, I normally create a configurable setting for the 'destination module'.  To do this, create a new user control called 'productlistsettings.ascx' and, when you set up your module, make sure it has a <key>value in the manifest file of 'Settings'.   That way, when the user clicks on the 'settings' icon of the product list module, your custom settings control will be loaded.  On this settings control, just build a drop-down list of dnn tabs for the site.  The user selects the tab for the 'destination' product module - which is the module that the 'productView'.   Then, when you're in your module code, (for example, on an item_Databound event for a repeater control), you will build the Url link to the product view module page like this:

//gets the tab id of the product view page from the module settings

int tabid = int.parse(this.Settings["DestTabId"]);

//gets the url of the destination page, including the current product id

string destUrl = DotNetNuke.Common.Globals.NAvigateURL(tabId, "", "productId=" + productId)

//sets the product link hyperlink to the product destination page

HyperLink hl = (HyperLink)e.item.findControl("hlProductLink");

hl.NavigateUrl = destUrl;

You will build a .net class to represent 'ProductInfo' and the whole lot will be returned from your database using a SqlDataProvider, which is just a DataProvider built for your module.  Grab an example module source and crack it open to get an idea of how this fits together.  It will be daunting at first, but if you're an experience developer the peices will fall into place pretty quickly.  The reason it looks more complicated than it needs to be is so that you can get plug'n'play flexibility.  If you (think) you don't need this, then go ahead and code a simpler version up.

You will also want to look into implmeent the DOtNetNuke searchable interface into your module, so that you can feed your product list back to the DNN search engine.  THis will allow you to integrate the site search with your product search.

This should get you started.  Also look at my most recent blog post : Designing, Structuring and Architecting DotNetNuke Modules

Hope this helps.  Once you go DNN, you'll never do a 'file->new project->asp.net website' again, I can promise you!

 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Convert traditional ASP.NET design approaches to DNN. Thoughts appreciated! Convert traditional ASP.NET design approaches to DNN. Thoughts appreciated!


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out