Object DataSource parameters

  • Thread starter Thread starter thomson
  • Start date Start date
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
 
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
 
Back
Top