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
Aarti Gupta
841
963
12.4k
dataTable and session variable.
Nov 16 2020 7:38 AM
I am using Ado.Net DataTable and DataAdapter to query the database, after successfully logging , i want to store the datatable values into session , how to achieve that?
using
(SqlConnection con =
new
SqlConnection(cs))
{
SqlDataAdapter da =
new
SqlDataAdapter(
"select * from UserMaster where Name=@Name and Password=@Psd"
,con);
da.SelectCommand.Parameters.AddwithValue(
"@Name"
,txtuserName.Text);
da.SelectCommand.Parameters.AddwithValue(
"@Psd"
,Bl.Decrypt(txtuserpsd.Text));
con.Open();
System.Data.DataTable dt =
new
System.Data.DataTable();
da.Fill(dt);
// here i have to store it in session
}
Reply
Answers (
1
)
In date range Start date should be one month before the current date
Is this case sensitive?