473,405 Members | 2,373 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,405 software developers and data experts.

DataBinder

Hello,
I create in datagrid <ItemTemplate><%#DataBinder.Eval(Container.DataIte m,
"ID_0061_PREDECESSOR")%></ItemTemplate>. This is written in HTML code. But
now is shown Guid 0000-00000-0000.... in datagrid. But I need create in
ItemTemplate "IF" construction like this:

If DataBinder.Eval(Container.DataItem, "ID_0061_PREDECESSOR")!=Guid.Empty
DataBinder.Eval(Container.DataItem, "ID_0061_PREDECESSOR")

So if ID_0061_PREDECESSOR isn't empty, then write in page the value of
ID_0061_PREDECESSOR.
How can I create this construction?

Thanks Lubos
Nov 19 '05 #1
1 1533
<%# If (GUID) DataBinder.Eval(Container.DataItem, "ID_0061_PREDECESSOR") !=
Guid.Empty
DataBinder.Eval(Container.DataItem, "ID_0061_PREDECESSOR") %>

And don't forget to imort the proper namespace for the GUID

Hope that helps!
Ragards,
Kostadin Kostov

"l" wrote:
Hello,
I create in datagrid <ItemTemplate><%#DataBinder.Eval(Container.DataIte m,
"ID_0061_PREDECESSOR")%></ItemTemplate>. This is written in HTML code. But
now is shown Guid 0000-00000-0000.... in datagrid. But I need create in
ItemTemplate "IF" construction like this:

If DataBinder.Eval(Container.DataItem, "ID_0061_PREDECESSOR")!=Guid.Empty
DataBinder.Eval(Container.DataItem, "ID_0061_PREDECESSOR")

So if ID_0061_PREDECESSOR isn't empty, then write in page the value of
ID_0061_PREDECESSOR.
How can I create this construction?

Thanks Lubos

Nov 19 '05 #2

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

Similar topics

0
by: Michelle Keys | last post by:
Subject: DataBinder.Eval Error! Server Error in '/MSPOS' Application. ------------------------------------------------------------------------ -------- DataBinder.Eval:...
2
by: dm_dal | last post by:
I have a control on my webform that I am binding to a dataset. The issue is, the field value in the dataset is encrypted and I am trying to decrypt it during the binding process: Example: ...
5
by: bg | last post by:
Hi! How do I check if "date" exists before using that code? I've built a RSSreader and sometimes there's a date in it and sometimes not. How can I check if it exists to avoid crash...
4
by: Søren Lund | last post by:
Hello, I am trying to bind a DataGrid with some data from a DataSet which contains fields in the form "group.fieldname". I am certain that my data source contains the field but I cannot get my...
1
by: Mike Lerch | last post by:
Pretty much, TSIA, but I'll expand a bit: I'm still trying to get my head around the n-tier approach to web design. It seems to me that when you use DataBinder.Eval in the ASPX that your tiers...
2
by: jack | last post by:
Hello, I have a date in a SQL Database and want to use the dateformat tools to format the output. I am now using the Month, Day, and Year to do it now. I want to change: Released Date:...
3
by: Aleko Petkov | last post by:
Hi, I want to display different content in a DataGrid row, depending on the value returned by a DataBinder. I am trying to write something like this: <ItemTemplate> <% if(...
4
by: CharlesA | last post by:
a general question... I'm a bit mystified by Databinder.eval(object, Colname, ) if controls can be bound to their individual data sources within the load event of the page... why would we ever...
1
by: RobASPNewGuy | last post by:
Hi, I'm new to this forum and hope I can get some help. I would like to make life easier by combining a appSetting (global variable set in the web.config file) and DataBinder.Eval to create a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.