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
sarin s
NA
18
17.6k
I have a Listview named "listview1". I am displaying students name in the list view. I got collecti...
Aug 14 2012 2:28 AM
I have a Listview named "listview1". I am displaying students name in the list view.
I got collection of students Id and name in a data table.
// appending the students name in the listview
foreach (DataRow dr in dtStudentInfo.Rows)
{
Item = listView1.Items.Add(dr["strName"].ToString());
Item.Tag = dr["nId"].ToString();
}
question : How can i get name of the student if i know the student Id?
Eg: For the student Id 5 i want to know the name of the student.
Here i can do this by getting whole item collection inside a for loop and
i can compare the tag. But i want a direct method where i can specify the tag as 5 and get
student name for the respective tag?
Reply
Answers (
2
)
Get the value of textbox100, but the textbox100 is in Form2.
Auto increment the number after clicking submit button in c#.net calling store procedure