Here is maybe a little simpler example. You would of course need to change the procedure name referenced as the InsertMethod. You would also need to add a value to be accepted in your procedure.
On your page you have the ObjectDataSource. You would specify the TypeName as the class that your procedure resides in. Then specify the procedure in the InsertMethod. Next, inside the <InsertParameters> tag you would declare the type of asp: parameter to user. In this case I chose a SessionParameter. There are 7 different types of parameters that you can use. Play with the intellisense to see the others. In the SessionParameter below, the SessionField property refers to the name of the session variable I have set elsewhere in code. The Name property refers to the name of the variable used in the Procedure such as MyFunction(Byval category As String), where category is the variable referred to in the Name property below.
<asp:ObjectDataSource ID="ObjectDataSourceBlogEntries" Runat="server"
TypeName="BlogManager" InsertMethod="AddBlogEntry">
<InsertParameters>
<asp:SessionParameter DefaultValue=""
Name="category"
Direction="Input"
SessionField="blogcategory"
Type="string"
ConvertEmptyStringToNull="false" />
</InsertParameters>
</asp:ObjectDataSource>
Then you have your procedure that is referred to in the InsertMethod above.
Public Shared Function GetBlogEntries(Optional ByVal category As String = "") As Generic.List(Of Blog)
' In here you would have code that uses the Category value passed in to Insert into the database.
End Function
Jeremy
Extended Personal Site Starter kit