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
Lakshmikanth Chowdary
NA
58
1.2k
display data from database base on date
Nov 1 2017 3:54 PM
public ActionResult search(DateTime StartDate, DateTime enddate)
{
string EmpVisitor = @"Data Source=UTSIN-15;User ID=sa;Password=unified;Initial Catalog=EmpVisitor;MultipleActiveResultSets=True;Application Name=EntityFramework";
DataTable dtbl = new DataTable();
using (SqlConnection sqlcon = new SqlConnection(EmpVisitor))
{
sqlcon.Open();
SqlDataAdapter sqlda = new SqlDataAdapter("select * from dbo.visitordetails where Date Between '" + StartDate + "' And '" + enddate + "'", sqlcon);
sqlda.Fill(dtbl);
//return RedirectToAction("List");
}
return View(dtbl);
}
-------------------------------------------------------------------------
im getting the datatable empty
Reply
Answers (
4
)
conversion of jpg file to vcf file
linq to display data in matrix form