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
Nethra R S
NA
310
335.1k
Want to access cell value in a gridview at selected indexchanged event
Jun 28 2011 5:18 AM
Hi,
Here is the code:
protected void gvProjectDetails_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
{
string proj_id = gvProjectDetails.SelectedRow.Cells[1].Text;
conobj.connect();
conobj.CMD.CommandText = "select * from ProjectDetailsMaster where ProjectID='"+proj_id+"'";
conobj.DTR = conobj.CMD.ExecuteReader(CommandBehavior.CloseConnection);
while (conobj.DTR.Read())
{
txtprojname.Text=conobj.DTR["ProjectName"].ToString();
txtprojdescription.Text = conobj.DTR["Description"].ToString();
txtstartdate.Text = conobj.DTR["StartDate"].ToString();
txtenddate.Text = conobj.DTR["EndDate"].ToString();
txtduration.Text = conobj.DTR["Duration"].ToString();
}
conobj.DTR.Close();
}
=================================================
Getting an error: Object reference not set to an object at the 1st line of code
Reply
Answers (
2
)
How to display uploaded images on webpage in asp.net
Collections