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

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Help with List - DetailHelp with List - Detail
Previous
 
Next
New Post
2/6/2007 10:54 AM
 

Hi !

I am just starting to learn how to develop dotnetnuke custom modules but I real need some guidance. I have developed a simple module with a view and edit controls. In the view control is retrieved from database and showed a list of projects like:

Project1 – Project title

After this I need to click in this item and jump to the project detail. In a regular ASP application I would have “Project1” as a link to another page, like:   ProgectDetail.aspx?ProjId=xx. What is the best way to do this with DNN ? Do I jump to another page where I will have another view control ? or can I somehow hide and show another control in the same page ? And how can I send the current project ID ?

 Thanks a lot for your help.

Best Regards

Rosorio  

 
New Post
2/7/2007 3:28 PM
 
rosorio wrote
After this I need to click in this item and jump to the project detail. In a regular ASP application I would have “Project1” as a link to another page, like:   ProgectDetail.aspx?ProjId=xx. What is the best way to do this with DNN ? Do I jump to another page where I will have another view control ? or can I somehow hide and show another control in the same page ? And how can I send the current project ID ?

 Thanks a lot for your help.

Best Regards

Rosorio  



You can add another User Control and link to it just as you would with a page by sending the details Id in the querystring. Look at this post I answered earlier and you will get some idea on how to do it. I went through what you are going through last week. My Post

HTH
 
New Post
2/7/2007 4:13 PM
 

You would do the following.

  1. Create a new User Control (assume ProjectDetail.ascx)
  2. Add this control to the Module Definition for your module and give it a key (Detail)
  3. In your main user control create a link for the project detail as follows - EditURL(keyname, keyvalue, ControlKey), where keyname would be "ProjId" in your example, keyvalue would be the Id of the project as a string, ControlKey would be the key you gave the ModuleControl in (2) above.
  4. In the UserControl you created for the detail, use code to obtain the "ProjId" from the Querystring and display the relevant project detail.

If you are using a DataGrid for the display of the projects you can use a ImageCommandColumn, as follows to replace step (3)

Add a register statement at the top of the ascx file.

<%@ Register TagPrefix="dnn" Namespace="DotNetNuke.UI.WebControls" Assembly="DotNetNuke" %>

Add the following column to the grid:

  <dnn:imagecommandcolumn CommandName="Edit" ImageUrl="~/images/edit.gif" EditMode="URL" KeyField="ProjId" />

This assumes that the ProjID is the primary key of the project object which is bound to the grid.


Charles Nurse
Chief Architect
Evoq Content Team Lead,
DNN Corp.

Want to contribute to the Platform project? - See here
MVP (ASP.NET) and
ASPInsiders Member
View my profile on LinkedIn
 
New Post
2/7/2007 4:35 PM
 

I didn't know this existed  <dnn:imagecommandcolumn CommandName="Edit" ImageUrl="~/images/edit.gif" EditMode="URL" KeyField="ProjId" />

Cool!

 
New Post
2/14/2007 5:07 PM
 

Hi !

Thanks a lot for your help. Worked great. I have inherit my new user control from Entities.Modules.PortalModuleBase, other way the control only showed an error when rendered in the site.

I have only one question. My new control is showed with the default container configured for the page. Can i change this ? Can i set it to have the same container as the main control (the one with the link) ?

Thanks again.
Rosorio

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Help with List - DetailHelp with List - Detail


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