I’m trying to populate the ASP.NET LISTVIEW with Stored Procedure(@param1). Could anyone please let me know if it’s possible at all. If it’s possible, if show me few lines of code will be very helpful.
I’m trying to populate the ASP.NET LISTVIEW with Stored Procedure(@param1) . Could anyone please
Share
See the Data Points: Data Source Controls in ASP.NET 2.0 article on MSDN which nicely shows how to use the
SqlDataSourcein your web app to provide data to data-capable controls.Basically, you need a SqlDataSource
that defines where to connect to to get your data (to your stored proc) – here, you’ll need to determine how to fill that parameter – in code? From another control on your ASP.NET page? Depending on that, you might use other elements into
<SelectParameters>.Once you have the data source, you can connect your list view to it:
Here, you need to set two fields:
DataTextField)?DataValueField)?