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
swati agrawal
NA
20
98k
how to find value of label in gridview
Mar 10 2011 5:36 AM
i have a label in itemtemplate of gridview.want to access value of dat label bt its giving me null value.my code is:
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
bind();
}
}
public void bind()
{
string qry = "SELECT tbl_artists.name as ArtistName, tbl_artists.profilePic as Pic,tbl_venues.name AS VenueNmae,convert(varchar(50),tbl_ArtistSchedule.Date,105)as Date, tbl_ArtistSchedule.Time FROM tbl_ArtistSchedule INNER JOIN tbl_artists ON tbl_ArtistSchedule.artistId = tbl_artists.artistId INNER JOIN tbl_venues ON tbl_ArtistSchedule.venueId = tbl_venues.venueId";
ds = obj.fillds(qry);
GridView1.DataSource = ds;
GridView1.DataBind();
}
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
Label lbl1 = (Label)e.Row.FindControl("lblday");
string date = lbl1.Text;
}
Reply
Answers (
4
)
oops
Identity insert off