Monday, March 26, 2012

Simple but strange "The server tag is not well formed" error!

Hi there,

For the life of me i cant see the problem with this server tag, but i keep getting "server tag is not well formed" error. Does anyone have any ideas? Its definately the"<%# Eval("AssetID") %>" bit causing the problem.

<asp:ImageAlternateText="vxcc"Visible='<%# Eval("AssetID")==DBNull.Value ? false: true %>'ImageUrl="../UserControls/ImageFromDB.ashx?liAssetID=<%# Eval("AssetID") %>"runat="server"/>

Many thanks!!

Ben

Hi,

I think you should replace property

ImageUrl="../UserControls/ImageFromDB.ashx?liAssetID=<%# Eval("AssetID") %>"

with

ImageUrl='../UserControls/ImageFromDB.ashx?liAssetID=<%# Eval("AssetID") %>'


Hi ThaYoung,

Thanks for the response, i solved the problem now, its amazing what some sleep (or lack fo) can do! Heres the solution:

<asp:ImageID="Image1"AlternateText=""Visible='<%# Eval("AssetID")==DBNull.Value ? false: true %>'ImageUrl='<%# "../UserControls/ImageFromDB.ashx?liAssetID=" + Eval("AssetID") %>'runat="server"/>

0 comments:

Post a Comment