TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
mohammad qasim
NA
408
0
How to call store procedure by sqldatasource Programmatically to bind gridview
Dec 7 2011 1:41 PM
how can we execute store procedure by using sqldatasource
Programmatically??
I want to bind it with gridview
i am using like this
Collapse
|
Copy Code
sqldsSiteList.SelectCommandType = SqlDataSourceCommandType.StoredProcedure sqldsSiteList.SelectCommand =
"Stp_RmsAdmin_GetsitesBycustomization"
Collapse
|
Copy Code
sqldsSiteList.SelectParameters.
Add
(
"@CustomerID"
, TypeCode.Int32, ddlCustomer.SelectedValue) sqldsSiteList.SelectParameters(
0
).Direction = ParameterDirection.Input
Collapse
|
Copy Code
sqldsSiteList.SelectParameters.
Add
(
"@PageIndex"
, TypeCode.Int32,
"1"
) sqldsSiteList.SelectParameters(
1
).Direction = ParameterDirection.Input GridView1.DataBind()
when i bind it to grid it gives me error
Collapse
|
Copy Code
"Procedure or Function 'Stp_RmsAdmin_GetsitesBycustomization' expects parameter '@CustomerID', which was not supplied."
Reply
Answers (
2
)
Formsview 2010 formatting
How to do this?