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
vikrant gupta
NA
2
2k
how to fetch latest row update in label in asp.net
Oct 2 2014 8:53 AM
protected void Page_Load(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection(strConnString);
con.Open();
str = "select * from emp where id = max(id)"
com = new SqlCommand(str, con);
SqlDataReader reader = com.ExecuteReader();
reader.Read();
labelname1.Text = reader["Name"].ToString();
reader.Read();
labelname2.Text = reader["Name"].ToString();
reader.Read();
labelname3.Text = reader["Name"].ToString();
reader.Close();
con.Close();
con.Open();
SqlDataReader reader1 = com.ExecuteReader();
reader1.Read();
labelage1.Text = reader1["Age"].ToString();
reader1.Read();
labelage2.Text = reader1["Age"].ToString();
reader1.Read();
labelage3.Text = reader1["Age"].ToString();
reader.Close();
con.Close();
}
but this code is not working guys kindly help me.
Reply
Answers (
3
)
convert image to binary
writing data into csv file