Code Behind Syntax when using a Stored Procedure

In the following code behind what is the difference in the syntax if using a stored procedure.

Protected Sub InsertShipper (ByVal Source As Object, ByVal e As EventArgs)
  SqlDataSource1.Insert()
End Sub

The code above uses a T-SQL insert statement on an aspx page to insert a record into the database when button is clicked. I do know that the SelectCommandType on the aspx page will = Stored Procedure. However, I know the Insert of the ****SqlDataSource1.Insert()*** above will be different but I do not know the exact code that would be needed to fire the Stored Procedure and perform the insert.. Any help or guidance is greatly appreciated.
derrekdeveloperEnterprise Solution ArchitectAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

SriVaddadiCommented:
//

set connection string for SQLDataSource
///
mySqlDataSource.ConnectionString =

"< your connection string > ";
/// Specify select commands type and select command
///
mySqlDataSource.SelectCommandType =

SqlDataSourceCommandType.StoredProcedure;
mySqlDataSource.SelectCommand =

" myStoredProcedure";
/// specify some parameters for stored procedure
///
/// Parameter name direction : input
///
mySqlDataSource.SelectParameters.Add(

"@Name", TypeCode.String, "Name");
mySqlDataSource.SelectParameters[0].Direction =

ParameterDirection.Input;
/// Parameter name age : ouput
///
mySqlDataSource.SelectParameters.Add(

"@Name", TypeCode.Int16, "Name");
mySqlDataSource.SelectParameters[0].Direction =

ParameterDirection.Output;
/// its all set you can now use this is a DataSource for your controls
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
SriVaddadiCommented:
check this out even this might hlp

http://aspnet.4guysfromrolla.com/articles/030106-1.aspx
0
derrekdeveloperEnterprise Solution ArchitectAuthor Commented:
Very, very good article offered.
0
SriVaddadiCommented:
Thanks appreciate  your comments
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.