Showing posts with label repeater. Show all posts
Showing posts with label repeater. Show all posts

Saturday, March 24, 2012

PLEASE HELP ! URGENT ! repeater errors !

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...

FredrikFredrik why don't you try doing it in your CodeBehind ?

*** Sent via Developersdex http://www.developersdex.com ***
Howdy everyone !!!
Please disregard this message ! I have solved the problem !
Thanks alot, especially "london calling" who provided me with a better
solution !!

Thanks

PLEASE HELP ASP.NET PROBLEM

Dear All,

I have encountered a very strange problem with DataBinding a repeater.

1. I have a DataTable that has 100 record (3 columns with number only and
the records count is also confirmed)
2.I have created a proper Repeater
3. The Repeater has a databinding with the datatable
4.When I databind() the repeater, only some of the records get rendered and
the remaining aspx file ends up incomplete! it is as though the databinding
breaks at some point resulting the page not being parsed correctly.
5. I am using .NET 1.1 with spk

Has anyone ever seen something like this?Can you provide more info or where the error is existing in your code.
Patrick

"Yet another C# coder" <gevik@.hotmail.com> wrote in message
news:O$9ScPKuFHA.3236@.TK2MSFTNGP14.phx.gbl...
> Dear All,
> I have encountered a very strange problem with DataBinding a repeater.
> 1. I have a DataTable that has 100 record (3 columns with number only and
> the records count is also confirmed)
> 2.I have created a proper Repeater
> 3. The Repeater has a databinding with the datatable
> 4.When I databind() the repeater, only some of the records get rendered
and
> the remaining aspx file ends up incomplete! it is as though the
databinding
> breaks at some point resulting the page not being parsed correctly.
> 5. I am using .NET 1.1 with spk
> Has anyone ever seen something like this?

PLEASE HELP ASP.NET PROBLEM

Dear All,
I have encountered a very strange problem with DataBinding a repeater.
1. I have a DataTable that has 100 record (3 columns with number only and
the records count is also confirmed)
2.I have created a proper Repeater
3. The Repeater has a databinding with the datatable
4.When I databind() the repeater, only some of the records get rendered and
the remaining aspx file ends up incomplete! it is as though the databinding
breaks at some point resulting the page not being parsed correctly.
5. I am using .NET 1.1 with spk
Has anyone ever seen something like this?Can you provide more info or where the error is existing in your code.
Patrick
"Yet another C# coder" <gevik@.hotmail.com> wrote in message
news:O$9ScPKuFHA.3236@.TK2MSFTNGP14.phx.gbl...
> Dear All,
> I have encountered a very strange problem with DataBinding a repeater.
> 1. I have a DataTable that has 100 record (3 columns with number only and
> the records count is also confirmed)
> 2.I have created a proper Repeater
> 3. The Repeater has a databinding with the datatable
> 4.When I databind() the repeater, only some of the records get rendered
and
> the remaining aspx file ends up incomplete! it is as though the
databinding
> breaks at some point resulting the page not being parsed correctly.
> 5. I am using .NET 1.1 with spk
> Has anyone ever seen something like this?
>