PLEASE HELP ! URGENT ! repeater errors !

F

fredda054

I now get the following error with my repeater...
short desc. of problem. I want to display hyperlinks with a repeater,
but add "link not available" and disable the hyperlink if the field in
DB is null.

as it is now i get:

"Compilation Error"
"Compiler Error Message: BC30201: Expression expected"

in the compiler output i get "error BC30545: Property access must
assign to the property or use its value."

at the line: Container.DataItem("SubjectName") & ": link not
available",
and i also get "error BC30205: End of statement expected" at the same
line...

can anyone see what i'm doing wrong ???

everything was working fine until i tried to add the conditional
statements (iif...)

this is my code in the itemtemplate of the repeater (except the html
tables etc)

<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" />

thanks a lot...I'm kind of in a hurry here...

Fredrik
 
F

fredda054

Howdy everyone !!!
Please disregard this message ! I have solved the problem !
Thanks alot, especially "london calling" who provided me with a better
solution !!

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top