473,396 Members | 1,968 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

shouldn't this work?

hey all,
i have a gridview with an image inside an item template. the imageUrl
property looks like this:

(Eval("Gender")=="Unknown")?"~/images/failed.png":"~/images/success.png"

for some reason it always evaluates false which isn't the case for all my
values. any ideas?

thanks,
rodchar
Mar 21 '07 #1
2 931
On Mar 21, 2:58 pm, rodchar <rodc...@discussions.microsoft.comwrote:
hey all,
i have a gridview with an image inside an item template. the imageUrl
property looks like this:

(Eval("Gender")=="Unknown")?"~/images/failed.png":"~/images/success.png"

for some reason it always evaluates false which isn't the case for all my
values. any ideas?

thanks,
rodchar
cast the eval to a string

((string)Eval("Gender"))==...

Mar 21 '07 #2
Thank you very much.

"Alexey Smirnov" wrote:
On Mar 21, 2:58 pm, rodchar <rodc...@discussions.microsoft.comwrote:
hey all,
i have a gridview with an image inside an item template. the imageUrl
property looks like this:

(Eval("Gender")=="Unknown")?"~/images/failed.png":"~/images/success.png"

for some reason it always evaluates false which isn't the case for all my
values. any ideas?

thanks,
rodchar

cast the eval to a string

((string)Eval("Gender"))==...

Mar 22 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Tom D. | last post by:
I just got a new computer. I transfered my web site files over and setup my access database system ODBC driver. I've compared settings on both computers. But when I run my web site code on new...
0
by: Ben Margolin | last post by:
I am new to subselects, and what I really want is to do them in an update, but the following shows a simpler select, that also doesn't seem to work as I think it should. Advice? Do I just...
0
by: Daniel Weber | last post by:
Hi! In my code I create a CryptoStream around another stream of my own, with CryptoStreamMode.Read. So I just can read from the CryptoStream. When I close that CryptoStream, however, the...
12
by: ORC | last post by:
Shouldn't 'ReadFile' block when timeouts are specified even when running in overlapped mode or am I wrong ??? Thanks Ole
3
by: Paul | last post by:
Hi I am setting a boolean value to true on a page and writing the results to viewstate Just above the web form designer generated code I have Dim bps_found As Boolean 'visible to this module in...
1
by: FishKeeper | last post by:
I'm trying to write JavaScript code to test whether cookies are enabled by writing a cookie and then reading its value. My code works fine in Firefox, but it's not working in Internet Explorer 6. ...
4
by: Joe Van Dyk | last post by:
The FAQ at http://www.parashift.com/c++-faq-lite/exceptions.html#faq-17.6 says that you shouldn't throw built-in exceptions. I'm not sure why I shouldn't throw something like std::domain_error...
28
by: Jess | last post by:
Hello, It is said that if I implement a "swap" member function, then it should never throw any exception. However, if I implement "swap" non- member function, then the restriction doesn't...
2
by: year1943 | last post by:
There was the same topic not so long ago, but as I see it stays w/o answer:...
4
by: Damjan | last post by:
There are several attempts to allow python to work with per user (or even per session) 'site-packages' like virtualpython / workingenv / virtualenv. But they all have their own shortcomings and...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.