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.0URL Control in a listURL Control in a list
Previous
 
Next
New Post
4/30/2009 7:02 PM
 

I have a Portal:URL control in settings for a module. I want the user to be able to select a tabid in settings, and I need to be able to create links in a repeater control.

The repeater is also databound to a db query, and I need to add a querystring name/value pair to the URL.  I haven't had any luck trying to do this.

The ModuleSettings tabid value is called "PageURL" and the value returned for the querystring is called ServiceID, which I can get by <%# DataBinder.Eval(Container.DataItem,"ServiceID") %> The text for the URL comes from <%# DataBinder.Eval(Container.DataItem,"ServiceDesc") %>

How can I combine these things so that I have a clickable link that takes me to
tabid/58/SID/233/default.aspx (if ServiceID is 223)? And for the next record, tabid/58/SID/477? ... they all go to the same page but with varying ServiceIDs.

Some assistance with this would be very much appreciated!


 


pmgerholdt
 
New Post
4/30/2009 9:23 PM
 

Michael

I've tried to do a similar thing in the past, and using the Url control from DNN isn't really the best way to go.  You'll find it easier to roll your own custom control in a repeater : thus leaving out some of the baggage of the url/link control.  When you roll your own, you can do better things with the code, and you'll probably get it done quicker than trying to reverse hack the url list control into a repeater.

I would suggest you actualy use a DataList control instead of a repeater, so you have to choose which record to edit.  Doing it this way will speed your load time up a lot, because otherwise you'll be creating a drop down list of pages in a portal x number of rows on the screen : and quickly end up with a huge page size (in terms of bytes) which will slow things down immensefly with any postbacks backwards and forwards (ie 200k worth of data backwards and forward to the server for each postback).    I don't know if this is for a specific site or for use as a distributable module, but if you're planning to use this code on sites that haven't been developed yet (ie, you don't know how big they will be) then you could find the page unusable in terms of performance for sites with larger numbers of tabs.   This may not be a problem, though, if you know it's only going to be used on a site with 10 pages.

I've been doing a lot of work in this space recently with paged tab lists which also work like the user list in DNN : clicking on a letter to get the related tabs.  This is more user friendly than a large drop down which quickly becomes unwieldy.    It also makes the page a lot faster and easier to use.  Drop downs are a pain once they get past about 10 entries.

My other piece of advice, if you're sticking with a repeater control, is to ditch the databainder.eval statements and just hook up to the itemdatabound event, and do the relevant binding of controls in there instead.  This stops the spread of your code logic from the code-behind page to the presentation layer, and makes it trivial to do more complicated binding like determining if something is to be a link or a drop-down list of pages.  It's also faster because the databinder.eval statement is completely late-bound.

Good luck with it and don't forget that some DNN sites run over a thousand pages.

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0URL Control in a listURL Control in a list


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