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?
--
Daisy The Cow 9 3855
try this:
<asp:Image id="galleryPhoto" runat="server" ImageUrl="<%# Gallery.Directory
+ "/" + Gallery.Filename %>" />
You're probably hitting some sort of bug in the aspx-to-C# converter, where
it's not generating correct C# source code.
--
--Grant
This posting is provided "AS IS" with no warranties, and confers no rights.
"Daisy" <da***@nospam.oops> wrote in message
news:7b***************@newsfep4-winn.server.ntli.net... 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? -- Daisy The Cow
Can you look at the source code that the ASP.NET csharp compiler generates?
Or send it so that we can see what is wrong with the code?
"Grant Richins [MS]" <gr*****@online.microsoft.com> wrote in message
news:#1*************@TK2MSFTNGP12.phx.gbl... try this: <asp:Image id="galleryPhoto" runat="server" ImageUrl="<%#
Gallery.Directory + "/" + Gallery.Filename %>" />
You're probably hitting some sort of bug in the aspx-to-C# converter,
where it's not generating correct C# source code.
-- --Grant This posting is provided "AS IS" with no warranties, and confers no
rights.
"Daisy" <da***@nospam.oops> wrote in message news:7b***************@newsfep4-winn.server.ntli.net... 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? -- Daisy The Cow
"Sankar Nemani" <sn*****@nospamlumedx.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl... Can you look at the source code that the ASP.NET csharp compiler
generates? Or send it so that we can see what is wrong with the code?
If you explain how to do it, maybe... I've not been poking around in things
I didn't write yet :D
--
Daisy The Cow
When you get the error message in the web page the error message contains
the path to the file it generated. And more over ther is a link to see the
source code on the error page.
"Daisy" <da***@nospam.oops> wrote in message
news:bu**********@linux01.dannytuppeny.com... "Sankar Nemani" <sn*****@nospamlumedx.com> wrote in message news:%2****************@TK2MSFTNGP09.phx.gbl... Can you look at the source code that the ASP.NET csharp compiler generates? Or send it so that we can see what is wrong with the code?
If you explain how to do it, maybe... I've not been poking around in
things I didn't write yet :D -- Daisy The Cow
"Sankar Nemani" <sn*****@nospamlumedx.com> wrote in message
news:eD**************@TK2MSFTNGP12.phx.gbl... When you get the error message in the web page the error message contains the path to the file it generated. And more over ther is a link to see the source code on the error page.
Right, here's a saved copy of the source of that page. Code expands when you
click the link: http://dannytuppeny.co.uk/error.htm
What's commented as Line 6 of Gallery.ascx is:
Line 34: #line 6
"http://localhost/MySite/Gallery/Controls/Gallery.ascx"
Line 35: protected System.Web.UI.WebControls.Image galleryPhoto;
Which doesn't look like it'd cause that error at all... Any suggestions?
"Daisy" <da***@nospam.oops> wrote in message
news:bu**********@linux01.dannytuppeny.com... Right, here's a saved copy of the source of that page. Code expands when
you click the link:
http://dannytuppeny.co.uk/error.htm
What's commented as Line 6 of Gallery.ascx is:
Line 34: #line 6 "http://localhost/MySite/Gallery/Controls/Gallery.ascx" Line 35: protected System.Web.UI.WebControls.Image galleryPhoto;
Which doesn't look like it'd cause that error at all... Any suggestions?
Ah, I see, lots of bits of code reference that same line...
It's gotta be this bit:
Line 154: #line 6
"http://localhost/MySite/Gallery/Controls/Gallery.ascx"
Line 155: target.ImageUrl =
System.Convert.ToString(Gallery.Directory %>/<%# Gallery.Filename);
Does this suggest a bug in what isn't my code? :(
--
Daisy The Cow
"Grant Richins [MS]" <gr*****@online.microsoft.com> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl... try this: <asp:Image id="galleryPhoto" runat="server" ImageUrl="<%#
Gallery.Directory + "/" + Gallery.Filename %>" />
You're probably hitting some sort of bug in the aspx-to-C# converter,
where it's not generating correct C# source code.
<asp:Image id="galleryPhoto" runat="server" ImageUrl="<%# Gallery.Directory
+ "/" + Gallery.Filename %>" />
This gives "The server tag is not well formed." :o(
--
Daisy The Cow
You have this
<asp:Image id="galleryPhoto" runat="server" ImageUrl="<%#Gallery.Directory>
+ "/" + Gallery.Filename %>" />
try this instead (try this as is and see)
<asp:Image id="galleryPhoto" runat="server" ImageUrl=<%#Gallery.Directory +
"/" + Gallery.Filename %> />
sorry for the delayed response
Sankar Nemani
"Daisy" <da***@nospam.oops> wrote in message
news:bu**********@linux01.dannytuppeny.com... "Daisy" <da***@nospam.oops> wrote in message news:bu**********@linux01.dannytuppeny.com... Right, here's a saved copy of the source of that page. Code expands when you click the link:
http://dannytuppeny.co.uk/error.htm
What's commented as Line 6 of Gallery.ascx is:
Line 34: #line 6 "http://localhost/MySite/Gallery/Controls/Gallery.ascx" Line 35: protected System.Web.UI.WebControls.Image
galleryPhoto; Which doesn't look like it'd cause that error at all... Any suggestions?
Ah, I see, lots of bits of code reference that same line...
It's gotta be this bit:
Line 154: #line 6 "http://localhost/MySite/Gallery/Controls/Gallery.ascx" Line 155: target.ImageUrl = System.Convert.ToString(Gallery.Directory %>/<%# Gallery.Filename);
Does this suggest a bug in what isn't my code? :( -- Daisy The Cow
"Sankar Nemani" <sn*****@nospamlumedx.com> wrote in message
news:e%****************@TK2MSFTNGP10.phx.gbl... You have this <asp:Image id="galleryPhoto" runat="server"
ImageUrl="<%#Gallery.Directory> + "/" + Gallery.Filename %>" /> try this instead (try this as is and see) <asp:Image id="galleryPhoto" runat="server" ImageUrl=<%#Gallery.Directory
+ "/" + Gallery.Filename %> />
sorry for the delayed response
No problem, you sorted it!
Looks meesy without the quotes, but it's only a server tag!
Thanks :)
--
Daisy The Cow This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Jill Graham |
last post by:
Hi,
From time to time, I receive following error message when trying to access
my website.
When the error occurs, I have to recompile my dll until the error disappears
(this without changing...
|
by: Holger (David) Wagner |
last post by:
Hi Group,
I've searched the Web for precompilers that compile ASPX/ASCX pages just
like it can be done with JSPs, but so far, I've only found approaches
targetted at increasing the performance....
|
by: bijoy |
last post by:
I have the C# web application running on 2 servers - dev and prod. Dev
runs Win2K and the prod runs Win 2K3.
I noticed some strange behavior on the 2k3 machine. When I copy over
all the required...
|
by: Vish |
last post by:
Hi,
We are having issues whenever we push the dynamically compiled .ascx files
into prod. These are the files with no codebehind and what happens is that
the old users see this error and the new...
|
by: f0zzyNUE |
last post by:
hi everyone,
currently we are testing the performance our application (asp.net
based CMS) ... for that reason we wrote a "spider" that starts
webrequests for all relevant pages which results in...
|
by: =?Utf-8?B?UGF1bCBCdXp6YSwgb2xkc3RlciB1c2luZyBuZXcg |
last post by:
I recently implemented error processing on my .net website, where I send
myself an email from global.asax on an application error. In the last two
days I have gotten a "The file '/detail.aspx'...
|
by: Handle |
last post by:
I want to customize some aspx / ascx files of a precompiled site (the
project portofolio web access site). I have no access to source code.
Using Visual Studio, when I try to edit one these files...
|
by: Tomasz J |
last post by:
Hello Developers,
I have a control derived from System.Web.UI.WebControls.WebControl. Control
has this property:
public string Value
{
set { _value = value; }
get { return _value; }
|
by: =?Utf-8?B?SmVycnkgQw==?= |
last post by:
I have a machine Windows Server 2003 using IIS 6.0 and I am getting the error
BC30560 prjob_ascx is ambiguous in the namespace ASP
I found a fix. Deleting all the files in the...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
| |