D
Daisy
Strange one here, got an ascx with the following line in it:
<asp:Image id="galleryPhoto" runat="server" ImageUrl="<%# Gallery.Filename
%>" />
All works fine, and my Gallery object has a Filename property.
I've just added Gallery.Directory, and changed the above line to this:
<asp:Image id="galleryPhoto" runat="server" ImageUrl="<%# Gallery.Directory
%>/<%# Gallery.Filename %>" />
And now get the error
CS1040: Preprocessor directives must appear as the first non-whitespace
character on a line
I tried changing them both to .Filename, in case I'd forgotten to completely
add the Directory property, but still the same. I tried adding "/Thumbs/"
instead of just a "/" between the two, since it works in another control
(not an ASP:Image) that looks like this:
<img src="Photos/<%# Photo.Gallery.Directory%>/Thumbs/<%# Photo.Filename %>"
alt="<%# Photo.Title %>" />
Anyone ever come across this before?
<asp:Image id="galleryPhoto" runat="server" ImageUrl="<%# Gallery.Filename
%>" />
All works fine, and my Gallery object has a Filename property.
I've just added Gallery.Directory, and changed the above line to this:
<asp:Image id="galleryPhoto" runat="server" ImageUrl="<%# Gallery.Directory
%>/<%# Gallery.Filename %>" />
And now get the error
CS1040: Preprocessor directives must appear as the first non-whitespace
character on a line
I tried changing them both to .Filename, in case I'd forgotten to completely
add the Directory property, but still the same. I tried adding "/Thumbs/"
instead of just a "/" between the two, since it works in another control
(not an ASP:Image) that looks like this:
<img src="Photos/<%# Photo.Gallery.Directory%>/Thumbs/<%# Photo.Filename %>"
alt="<%# Photo.Title %>" />
Anyone ever come across this before?