PC Review


Reply
Thread Tools Rate Thread

Collection replace in repeater

 
 
Leon Mayne
Guest
Posts: n/a
 
      4th Mar 2008
Could someone advise on what would be the best practice for the below
problem?

I am making a generalised search function which returns a record type (e.g.
Employee, Department), the Id of the record, and the record's name, e.g.

RecordType | RecordId | RecordName
-----------------------------------------
Department | 4 | IT Dev
Department | 5 | IT Support
Employee | 2 | Norbit

I need to display the info on a webform using a repeater, including a link
to edit the item in question, e.g.
<a href="EditDepartment.aspx?DepartmentId=4">
<a href="EditEmployee.aspx?EmployeeId=2">
Etc.

What the best way to do this? I could put a collection in the ASPX file
using the RecordType as the key and the URL format string as the value?
Reshape the datatable that gets returned from the database? Hook into the
ItemDatabound event of the repeater? Any ideas?

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DataRelation Collection Problem and Repeater =?Utf-8?B?SSBhbSBTYW0=?= Microsoft ASP .NET 8 7th Mar 2005 11:17 AM
Cant bind Repeater to Custom Collection A Traveler Microsoft ASP .NET 2 19th Oct 2004 04:24 PM
Cant bind Repeater to Custom Collection A Traveler Microsoft VB .NET 2 19th Oct 2004 04:24 PM
Binding Repeater to custom object collection Weston Weems Microsoft ASP .NET 1 30th Sep 2004 08:12 PM
looping through a repeater collection MattB Microsoft ASP .NET 0 18th May 2004 08:27 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:51 PM.