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

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesIssues with URLControlIssues with URLControl
Previous
 
Next
New Post
8/14/2010 8:34 AM
 
Hi,

Im new to DNN development, and am having problems with the URL control.

The ascx file contains the following:
<%@ Register TagPrefix="Portal" TagName="URL" Src="~/controls/URLControl.ascx" %>
...
<tr>
        <td class="SubHead" width="160">
            <dnn:Label ID="plLinkUrl" runat="server" ControlName="ctlLinkUrl" Suffix=":"></dnn:Label>
        </td>
        <td width="365">
            <Portal:URL ID="ctlLinkUrl" runat="server" Width="250" ShowNewWindow="True" ShowUsers="False" ShowLog="False" />
        </td>
    </tr>
....







And to manage this I have the following code in the code behind file (c#):
ctlLinkUrl.Url = MyObject.LinkUrl;
ctlLinkUrl.ShowDatabase = true;
ctlLinkUrl.ShowSecure = true;



Now, my issue is that the saving is working fine, however when I open an existing object, the edit screen, which uses the same code, dosent show all of the fields properly.

This control show the type of link, the link details (url, file folder / name or page(tab) name).  When you have a complete URL, it works fine.  When you have a file or page link, it shows the type correctly, and the folder (if applicaple), but not the actual page or file i had previously selected. (It just defaults to the first item in the appropriate dropdown).

Any help would be apprecieated. I am using DNN 5.4.2, just in case it is a known bug in that version.

Thanks in advance,
Lee
 
New Post
8/14/2010 2:18 PM
 
I would suggest explicitly telling the UI in the ASCX file exactly what to show and not show.  That's what I always do by default, just in case something is changed to not show by default or something.  Using your example, I might do the following:

<Portal:URL ID="ctlLinkUrl" runat="server" Width="250" 
ShowNewWindow="True" 
ShowUsers="False" 
ShowLog="False" 
Required="True" 
ShowFiles="True" 
ShowImages="False" 
ShowLog="False" 
ShowSecure="True" 
ShowDatabase="True" 
ShowUpload="True" 
ShowUrls="False" />
I simply put up all of the properties that might be of value to what you're trying to do.  Make sure you adjust those values at you see fit, to meet your needs.  Mitchel Sellers wrote a great book that outlines all of these properties, and pretty much every other part of the DNN API that you'd want to work with.  It's a great reference if you don't already know the API.  :)

Will Strohl

Upendo Ventures Upendo Ventures
DNN experts since 2003
Official provider of the Hotcakes Commerce Cloud and SLA support
 
New Post
8/15/2010 7:01 PM
 
Nope, that didnt work.  I have taken a few screen shots to show what I mean.

I go in and save the following:
http://twitpic.com/2f51jh

and when I go in and edit I get the following:
http://twitpic.com/2f51no

Note that everything is correct on the edit screen BUT the file name defaults to the top item in the list, like it cant fild the actual file I have so it is just showing the top one as a default.

If I'm still not explaining it right, please ask me for more info.

Thanks
Lee
 
New Post
8/15/2010 7:42 PM
 
Okay...  So what fields do you want to show in the URL control?

Will Strohl

Upendo Ventures Upendo Ventures
DNN experts since 2003
Official provider of the Hotcakes Commerce Cloud and SLA support
 
New Post
8/15/2010 7:45 PM
 
The fields are correct, but the fact that it isnt keeping the file name dropdown is an issue...
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesIssues with URLControlIssues with URLControl


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