Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Object DataSource parameters

Reply
Thread Tools

Object DataSource parameters

 
 
thomson
Guest
Posts: n/a
 
      08-09-2007
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

 
Reply With Quote
 
 
 
 
Alexey Smirnov
Guest
Posts: n/a
 
      08-09-2007
On Aug 9, 7:50 am, thomson <(E-Mail Removed)> 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...ial-06-vb.aspx

Hope it helps

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Nested Repeaters & Object DataSource Parameters! Adam Knight ASP .Net 0 04-03-2007 09:55 PM
FrameView child controls can't be used as DataSource Object parameters? namewitheldbyrequest@gmail.com ASP .Net 0 09-23-2006 06:46 PM
reuse gridview after changing data datasource parameters Greg Ramsey ASP .Net 0 03-19-2006 06:58 PM
Re: Datasource parameters Brock Allen ASP .Net 1 09-23-2005 11:36 AM
does a "parameters"-parameter overwrite the "parameters"-object? Florian Loitsch Javascript 11 03-15-2005 03:33 PM



Advertisments