L
Leon Mayne
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?
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?