Hello,
i'm using an asp:Reader and an ObjectDataSource. With this I get some
strings and integer-values... but some of the intergervalues could be a
<DBNull>-value.
In the repeater is a link, which should only be visible, if the an
integer-value isn't null (dbnull) (the value should be a number!).
I've tried much, but nothing worked. I get always an error-message with an
exception, that says, that the intergervalue is DBNull.
here is the code of the last try:
<asp:HyperLink ID="HyperLink2" runat="server" Visible='<%#
Eval("someID")!=DBNull.Value %>' NavigateUrl="#">My Link</asp:HyperLink>
I tried also:
((int?)Eval("someID")).HasValue
no success until now.
Could someone help me please?
thanks a lot,
Alex 4 4531
Have you tried
<asp:HyperLink ID="HyperLink2" runat="server" Visible='<%#
!Convert.IsDBNull(Eval("someID")) %>' NavigateUrl="#">My
Link</asp:HyperLink>?
"Alexander Widera" <aw**@hrz.tu-chemnitz.de-removethispartplease.comwrote
in message news:O7**************@TK2MSFTNGP03.phx.gbl...
Hello,
i'm using an asp:Reader and an ObjectDataSource. With this I get some
strings and integer-values... but some of the intergervalues could be a
<DBNull>-value.
In the repeater is a link, which should only be visible, if the an
integer-value isn't null (dbnull) (the value should be a number!).
I've tried much, but nothing worked. I get always an error-message with an
exception, that says, that the intergervalue is DBNull.
here is the code of the last try:
<asp:HyperLink ID="HyperLink2" runat="server" Visible='<%#
Eval("someID")!=DBNull.Value %>' NavigateUrl="#">My Link</asp:HyperLink>
I tried also:
((int?)Eval("someID")).HasValue
no success until now.
Could someone help me please?
thanks a lot,
Alex
doesn't work :(
the message again: The value for the row SomeID in table mytable is DBNull.
"Konstantinos Pantos" <ko***********@hotmail.comschrieb im Newsbeitrag
news:C2**********************************@microsof t.com...
Have you tried
<asp:HyperLink ID="HyperLink2" runat="server" Visible='<%#
!Convert.IsDBNull(Eval("someID")) %>' NavigateUrl="#">My
Link</asp:HyperLink>?
"Alexander Widera" <aw**@hrz.tu-chemnitz.de-removethispartplease.com>
wrote in message news:O7**************@TK2MSFTNGP03.phx.gbl...
>Hello,
i'm using an asp:Reader and an ObjectDataSource. With this I get some strings and integer-values... but some of the intergervalues could be a <DBNull>-value.
In the repeater is a link, which should only be visible, if the an integer-value isn't null (dbnull) (the value should be a number!). I've tried much, but nothing worked. I get always an error-message with an exception, that says, that the intergervalue is DBNull.
here is the code of the last try:
<asp:HyperLink ID="HyperLink2" runat="server" Visible='<%# Eval("someID")!=DBNull.Value %>' NavigateUrl="#">My Link</asp:HyperLink>
I tried also: ((int?)Eval("someID")).HasValue
no success until now.
Could someone help me please? thanks a lot,
Alex
problem not solved yet.
"Alexander Widera" <aw**@hrz.tu-chemnitz.de-removethispartplease.com>
schrieb im Newsbeitrag news:O7**************@TK2MSFTNGP03.phx.gbl...
Hello,
i'm using an asp:Reader and an ObjectDataSource. With this I get some
strings and integer-values... but some of the intergervalues could be a
<DBNull>-value.
In the repeater is a link, which should only be visible, if the an
integer-value isn't null (dbnull) (the value should be a number!).
I've tried much, but nothing worked. I get always an error-message with an
exception, that says, that the intergervalue is DBNull.
here is the code of the last try:
<asp:HyperLink ID="HyperLink2" runat="server" Visible='<%#
Eval("someID")!=DBNull.Value %>' NavigateUrl="#">My Link</asp:HyperLink>
I tried also:
((int?)Eval("someID")).HasValue
no success until now.
Could someone help me please?
thanks a lot,
Alex
Can you please provide some more info (exception info and/or code)?
It's really difficult to understand what's going on from a single line of
code.
____________________
Konstantinos Pantos
MCP Software Engineer http://kostas.pantos.name
"Alexander Widera" <aw**@hrz.tu-chemnitz.de-removethispartplease.comwrote
in message news:u0**************@TK2MSFTNGP02.phx.gbl...
problem not solved yet.
"Alexander Widera" <aw**@hrz.tu-chemnitz.de-removethispartplease.com>
schrieb im Newsbeitrag news:O7**************@TK2MSFTNGP03.phx.gbl...
>Hello,
i'm using an asp:Reader and an ObjectDataSource. With this I get some strings and integer-values... but some of the intergervalues could be a <DBNull>-value.
In the repeater is a link, which should only be visible, if the an integer-value isn't null (dbnull) (the value should be a number!). I've tried much, but nothing worked. I get always an error-message with an exception, that says, that the intergervalue is DBNull.
here is the code of the last try:
<asp:HyperLink ID="HyperLink2" runat="server" Visible='<%# Eval("someID")!=DBNull.Value %>' NavigateUrl="#">My Link</asp:HyperLink>
I tried also: ((int?)Eval("someID")).HasValue
no success until now.
Could someone help me please? thanks a lot,
Alex This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Oleg Ogurok |
last post by:
Hi all,
I have a DatePicker ASP.NET control that allows users to enter date (e.g. a
calendar control). The control has the following property
public DateTime Value { get; set; }
I've placed...
|
by: |
last post by:
I've defined an ObjectDataSource against a dataset, and I can bind the
ObjectDataSource's members to data controls.
I'm wondering how to take the values in an ObjectDataSource and...
|
by: Spotnick |
last post by:
When I found out about the detailsview control, I thought it would save me a
lot of time when doing basic table updates.
All my business logic layer uses strongly-typed datasets, and I did plug a...
|
by: David Hubbard |
last post by:
I am using a GridView to display a set of objects that have a parent-child
relationship. Each object, MyBO, has
an ID property that is used to get the children of that object.
class MyBO
{
...
|
by: Pao |
last post by:
I have a formview bounded to an objectdatasource.
All ok but I have some trouble with a checkbox: when I am in update
mode and I update the record, this field is never updated (no errors
thrown)....
|
by: tim.cavins |
last post by:
I have a GridView populated by an ObjectDataSource.
I am having issues passing the parameters to the objectdatasource. I
have verified that the method is being called but none of the
parameters...
|
by: Cirene |
last post by:
I'm setting a databound label's backcolor and forecolor like this...
<asp:Label ID="lblSampleColorScheme" runat="server"
BackColor='<%#...
|
by: nzkks |
last post by:
Hi, I am using these: ASP.Net 2.0, VB.Net, Visual Studio 2005, SQL Server 2005, Objectdatasource using DAL & BLL classes
My objectdatasource can produce below output by CategoryID parameter:...
|
by: semomaniz |
last post by:
I have a ajax reorderlist that displays the contents with out any problems but when i drag and reorder the list nothing happens, i get a postback and the same initial list is displayed, seems like my...
|
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...
|
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...
|
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,...
|
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...
|
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...
|
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: 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: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
| |