Object DataSource parameters
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
Date:Wed, 08 Aug 2007 22:50:47 -0700
Author:
|
Re: Object DataSource parameters
On Aug 9, 7:50 am, thomson wrote:
> 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
Date:Thu, 09 Aug 2007 07:26:00 -0000
Author:
|