Object DataSource parameters

T

thomson

Hi ,
i have a function which takes object as a parameter


eg: getCustomers(Customer objCustomer)



i have a gridview which inturn calls a objectDataSource which calls
getCustomers(Customer objCustomer)


How ever i have to send some parameters like objCustomer.Custid=
Somevalue to the objectDataSource,


How do i specify the values for the same

thanks in Advance

thomson
 
G

Guest

Hi ,
i have a function which takes object as a parameter

eg: getCustomers(Customer objCustomer)

i have a gridview which inturn calls a objectDataSource which calls
getCustomers(Customer objCustomer)

How ever i have to send some parameters like objCustomer.Custid=
Somevalue to the objectDataSource,

How do i specify the values for the same

thanks in Advance

thomson

You can use an event handler for the ObjectDataSource's Selecting
event to the page's code-behind class

Protected Sub objCustomer_Selecting (sender As Object, e As
ObjectDataSourceSelectingEventArgs) Handles objCustomer.Selecting
e.InputParameters("Custid") = Custid
End Sub

http://www.asp.net/learn/data-access/tutorial-06-vb.aspx

Hope it helps
 

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
473,754
Messages
2,569,528
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top