Getting a multiple recordset into a datalist

R

Roffers

Okay, so I have my stored procedure that looks something like this
AS

SELECT VAL 1, VAL 2
SELECT VAL1, VAL2
GO

And I need to display these into a datalist control, does anyone have
any idea how I can go about this?

Any examples of code in C# or VB.NET would be greatly appreciated.

Cheers
Mark
 
S

sloan

You can use

UNION
or
UNION ALL
inside the stored procedure


OR

Manually loop thru the IDataReader
and manually create ListItem values. And append them to the DataList. (I
think this works for DataList, I know it does for DropDownList)

...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top