M
msielski
I apologize if I don't explain this clearly, or if the solution is an
obvious one. I have been using ASP classic for a few years, but only
recently started with ASP.net. I have been reading Stephen Walther's
ASP.NET Unleashed 2nd Ed with much success, but have not been able to
figure out this issue:
I have a repeater web control on my page. I want to have a block of
HTML code appear within certain rows based on the value of a field in
the corresponding row of data. A simple example would be a repeater
listing products that displays 'New' icons next to the new ones.
In old ASP I would have probably put an IF block right there with the
optional HTML inside it. This isn't allowed in ASP.net, and rightly so
I suppose since it mixes code and presentation.
I have been very impressed with ASP.net so far and I'm sure there's a
reasonable way to do this. I have been searching and reading with no
luck. Any suggestions?
Thanks,
Matt
obvious one. I have been using ASP classic for a few years, but only
recently started with ASP.net. I have been reading Stephen Walther's
ASP.NET Unleashed 2nd Ed with much success, but have not been able to
figure out this issue:
I have a repeater web control on my page. I want to have a block of
HTML code appear within certain rows based on the value of a field in
the corresponding row of data. A simple example would be a repeater
listing products that displays 'New' icons next to the new ones.
In old ASP I would have probably put an IF block right there with the
optional HTML inside it. This isn't allowed in ASP.net, and rightly so
I suppose since it mixes code and presentation.
I have been very impressed with ASP.net so far and I'm sure there's a
reasonable way to do this. I have been searching and reading with no
luck. Any suggestions?
Thanks,
Matt