?
Solved

Changing databinder attributes before databind

Posted on 2013-01-07
1
Medium Priority
?
207 Views
Last Modified: 2013-01-09
Please see attached:

I have a databinder in my asp.net 2.0 code.

I want   to hide/remove a line of code as marked depending on the stylesheet I have
selected.

I want to do this in my c# code before I do my databind.

Your assistance is appreciated.

Thanks,
Isaac
databindcode.txt
0
Comment
Question by:TechIsaac
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 11

Accepted Solution

by:
madgino earned 2000 total points
ID: 38752453
It really depends on your "stylesheet" condition, how that look like.

The easiest would be to put your line in an extra if like below but depending on your condition there could be better solutions:

<% if your_condition then%>
<%# DataBinder.Eval(Container.DataItem, "WLFlag").ToString() == "True" ? "<img src='images/icon_w.png' height='14' width='14' />" : ""%>
<% end if%>
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question