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
Gnanu
1.7k
52
9k
Displaying user controls using OnDataBound
Apr 8 2019 5:19 AM
I have created two buttons using User controls
<input type="submit" value="Meeting Ended" align="center" style=" width: 120px; display: <%#(MeetingStatus) ? "inline" :"none"%>" class="buttonnew" />
<input type="submit" value="Completed" align="center" style="width: 120px; display: <%#(MeetingEnd) ? "inline" :"none"%>" class="buttonnew" />
Need to display them based upon this condition:
protected void dvControl_DataBound(object sender, EventArgs e)
{
foreach (DataRow row in _DataSource.Rows)
{
if (row["MEETING_ENDTIME"].ToString() != "")
{
MeetingStatus = false;
MeetingEnd = true;
}
else
{
MeetingStatus = true;
MeetingEnd = false;
}
}
}
but its binding based upon data table's last row.
I need to bind based upon
if (row["MEETING_ENDTIME"].ToString() != "") .
It's taking last row values and displaying all fields based upon that. But i need to execute the condition for each and every row
How to fix it?
Thanks in advance!
Reply
Answers (
0
)
Need Dumps For 70-480
Export EXcel From DataTable