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.0Providing a key to the View ControlProviding a key to the View Control
Previous
 
Next
New Post
5/14/2008 12:56 PM
 

When I provide a key to my View control, it simply doesn't gets rendered. I need to refer the View control by its key from other controls.

So, is it possible to provide a key to it??? Otherwise, how do I make a direct to it from other controls, which are not necessarily Edit controls (My searching revealed that using EditUrl() without any arguments takes to the View Control from Edit control, but if the referring control is not a View Control)???

Morover, is it possible to have multiple view controls, and navigate between them in a single module???

 
New Post
5/21/2008 4:02 PM
 

 

Hi,

I'm searching for the same answer but for another reason.
I would like to be able to specify a title for the view control in the resource file.
You specify the item in the resource file like 'mycontrol_edit.text' but for the view control this doesn't work (mycontrol_.text   ???)

For multiple view controls I suggest you to have a look at the below:
Dynamic Load User Controls in DotNetNuke
opensource.indyneinc.com/home/Support/DeveloperExchange/TehnicalPublication/tabid/67/articleType/ArticleView/articleId/6/Dynamic-Load-User-Controls-in-DotNetNuke-.aspx

I have used it with success earlier. I have used it more like a menu control. Not sure if that's your goal?
www.jarfallahockey.com/Ungdom/Team94/Team94sV%C3%A5rcup2008/tabid/263/PageID/0/Default.aspx


If it's stuck but's not supposed to be, WD-40 it.
If it's not stuck but supposed to be, duct tape it.
 
New Post
5/22/2008 11:34 AM
 

You can redirect from one view control to another like this.  If "ControlName" is the name of your deired view control.

C#

Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(this.TabId, "ControlName", "&mid=" + this.ModuleId));

VB

Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(me.TabId, "UWComments", "&mid=" + me.ModuleId))


-Mitchel Sellers
Microsoft MVP, ASPInsider, DNN MVP
CEO/Director of Development - IowaComputerGurus Inc.
LinkedIn Profile

Visit mitchelsellers.com for my mostly DNN Blog and support forum.

Visit IowaComputerGurus.com for free DNN Modules, DNN Performance Tips, DNN Consulting Quotes, and DNN Technical Support Services
 
New Post
5/25/2008 8:59 AM
Accepted Answer 

Thanx mitch for answering. However, my question was how to redirect to the default View Control. As the default control does not has a key, we cannot provide it in NavigateUrl().

However, I found out the solution. Using NavigateUrl() as is without providing any control key from anywhere in your module takes you to your default View Control. As for other view Controls, they have a key, so you can provide them in the NavigateUrl() method.

However, as we discussed it on your forums also, at any point of time while providing a Control key to NavigateUrl(), you also have to provide the unique Module Identifier  (ModuleID) of your Module, otherwise DNN does not know in which module to look for the control, and renders a Blank screen.

That can easily be corrected as you showed above by using a ModuleID parameter to NavigateUrl(), but when you do that, only your View Control gets rendered without other modules on the page that also come with the default View Control of your module.

The only solution I have found out to this solution is to load your View Controls dynamically (you can also do this with your Edit controls if you want other Modules to remain visible with your Edit Control). DNN assumes that by default, Editing is a sensitive task, and user should concentrate only on Editing the current module at a time, so it does not render other modules, which causes a problem with other View Controls also.

Dynamic loading is the only solution, which is not very difficult. The method has been presented in the second post above, as well as in Michael Washington's adefwebserver.com DNN Help site, which I should confess is very helpful, and helped me a lot to speed my my DNN learning curve. Only wished Michael had a forum or atleast some feedback system there, where users can request additional tutorials (if not a full-fledged forum)!!!

 
New Post
5/25/2008 11:11 AM
 

And yes, I forgot to mention that I read it somewhere (probably in Wrox Professional DNN from Core Team members) that the default View control of your module cannot & shouldnot have a key assigned to it.

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Providing a key to the View ControlProviding a key to the View Control


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