473,382 Members | 1,353 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Collection replace in repeater

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?

Mar 4 '08 #1
0 826

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Dunc | last post by:
I've bound a series of drop-down lists in a repeater control to a data table. I've late bound them to datatable, and am using the _ItemDataBound event to populate each control accordingly, and...
0
by: MattB | last post by:
I've got a WebForm that loops through a repeater's controls to get values entered into text boxes by a user. I'm getting to the values OK, but I want to populate a 2 dimensional array with the...
1
by: Weston Weems | last post by:
I've got a collection of objects say fruit. and fruit has a fairly decent heirachial structure not just flat props. I've got my repeater to bind to my fruit collection just fine, but what I want...
2
by: A Traveler | last post by:
Hi, I have a custom collection class i wrote, LineItemsCollection, which is a strongly typed collection of objects of my LineItem class. The LineItem class is a simple class with just a couple...
8
by: I am Sam | last post by:
Hi everyone, This problem is making me old. I don't want to get any older. I have a multi-nested repeater control as follows: <asp:Repeater ID="clubRep1" Runat="server">...
5
by: djc | last post by:
I need to prepare a large text database field to display in an asp.net repeater control. Currently I am replacing all chr(13)'s with a "<br/>" and it works fine. However, now I also want to be able...
4
by: Sjaakie | last post by:
I need to replace parts of a string, in a collection deserialized from an XML file, with values from another collection. Is there another, more clever/faster/better, method than the loops below? ...
2
by: sanju | last post by:
Hi, I am struggling to replace a bit value 'True' or 'False' with a image true.gif or false.gif and bind it to a repeater control. I am getting values 'true' or 'false' depending on whether...
6
by: Ken Fine | last post by:
I'm using SQLDataSource, which generates some kind of dataset, and then I attach that datasource to various data display controls such as DataList and repeater which loop through to the end of the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.