Parameters from a method RRS feed

  • Question

  • User-2106201665 posted

    Im using a Gridview thats using a objectdatasource that takes two parameters.

    I want to get the two parameters from two methods but i dont know how i should do it.

    One way would be to get the parameters from two controls like textboxes that get the values from the two methods but there must be some other way to do it.

    Friday, February 8, 2008 6:07 AM


  • User-647234374 posted

    Use the Selecting event to set them. 


    Protected Sub CategoriesDataSource_Selecting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.ObjectDataSourceSelectingEventArgs) Handles CategoriesDataSource.Selecting
       'Set parameter value through e.InputParameters...
       e.InputParameters("departmentID").Value = 7
    End Sub

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, February 8, 2008 9:21 AM