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
Jagjit Saini
NA
166
0
Display Records
Aug 23 2011 2:05 AM
Hi
I have one field code and find button in front of it . There are other text boxes & buttons etc. I want when user click on Find Button (window should display not page) in which it should list all the records in gridview from a table . When user select/click particular record it should display data of that selected record in the first form.
I have used list to display records in gridview
public List<nsBo.clscomprp> disp_rec()
{
SqlCommand cmd = new SqlCommand("select * from tbl_abc", con);
cmd.CommandType = CommandType.Text;
SqlDataReader dr = cmd.ExecuteReader();
List<nsBo.clscomprp> obj = new List<nsBo.clscomprp>();
while (dr.Read())
{
nsBo.clscomprp k = new nsBo.clscomprp();
k.pcomcode = dr[0].ToString();
k.pcomname = dr[1].ToString();
k.paddress1 = dr[2].ToString();
obj.Add(k);
}
dr.Close();
cmd.Dispose();
con.Close();
return obj;
}
This is Web Based requirement.
Thanks
Reply
Answers (
2
)
Microsoft Expression Blend 2 File Opening Problem
Add vs2010 project to visual source safe 2005