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
Sukhada Vader
NA
64
28.4k
Convert List to sql parameters
Jan 24 2019 1:19 AM
I am doing one project in MVC using SQL helper class.when i passes formcollection to stored procedure through jquery then there is an error that cannot convert generic list to sql parameters please help me.
my method is as follows,
[HttpPost]
public ActionResult SaveNotification(FormCollection formdata)
{
List
sqlParameters = new List
();
sqlParameters.Add(new SqlParameter("@NotificationID", formdata["NotificationID"]));
sqlParameters.Add(new SqlParameter("@ToDate", formdata["ToDate"]));
sqlParameters.Add(new SqlParameter("@FromDate", formdata["FromDate"]));
return PartialView("~/Views/Notifications/Index.cshtml", (new DBHelper().ExecuteNonQuery("SPName", sqlParameters)));
}
Reply
Answers (
1
)
Fields in table doesn't accept 10 precisions
I need select sql query