F
fredda054
Hi everybody !
With help from some nice people here I'm getting close to solve my
problem with dbnull values in a repeater.
I got it pretty much done, I just ned to fix some syntax.
I get a parse error on this code because it's not well formed.
Can someone please take a look at it and try to find what I'm doing
wrong...I've been staring at it for so long now I can't tell up from
down. I know it has to be a "'" or a '"' somewhere that's not correctly
matched...
The logic looks right so I guess all that's left to be done is fixing
the syntactic bugs...(easier said than done
see code below...(the table cell within the item template in the
repeater)
as always...thanks a million
Fredrik
<td>
<asp:HyperLink NavigateUrl='<%# "http://" &
Container.DataItem("Dep_WebsiteURL") %>' text='<%#
Iif(Container.DataItem("Dep_WebsiteURL") is dbnull.value,
Container.DataItem("SubjectName") & ": link not available",
Container.DataItem("SubjectName")) %>'enabled='<%#
Iif(Container.DataItem("Dep_WebsiteURL") is dbnull.value, false,
true)%>'
Runat="server" Target="_blank" ID="Hyperlink1" />
</td>
With help from some nice people here I'm getting close to solve my
problem with dbnull values in a repeater.
I got it pretty much done, I just ned to fix some syntax.
I get a parse error on this code because it's not well formed.
Can someone please take a look at it and try to find what I'm doing
wrong...I've been staring at it for so long now I can't tell up from
down. I know it has to be a "'" or a '"' somewhere that's not correctly
matched...
The logic looks right so I guess all that's left to be done is fixing
the syntactic bugs...(easier said than done

see code below...(the table cell within the item template in the
repeater)
as always...thanks a million
Fredrik
<td>
<asp:HyperLink NavigateUrl='<%# "http://" &
Container.DataItem("Dep_WebsiteURL") %>' text='<%#
Iif(Container.DataItem("Dep_WebsiteURL") is dbnull.value,
Container.DataItem("SubjectName") & ": link not available",
Container.DataItem("SubjectName")) %>'enabled='<%#
Iif(Container.DataItem("Dep_WebsiteURL") is dbnull.value, false,
true)%>'
Runat="server" Target="_blank" ID="Hyperlink1" />
</td>