Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

Generating ASP / ASP.net?

Is there something I can do to be able to generate ASP / ASP.net files with CityDesk? When I attempt to publish my pages, I get the following error:

Script Error: illegal token or identifier "%" in \index.aspx

Brad Wilson
Sunday, November 18, 2001

Actually, the bug looks far more significant.

I'm editing the page in HTML View. When I re-opened the index.aspx file, there was a bunch of additional garbage at the end of the file (partially the previous content of the page). No matter what I do, it would appear that this file is corrupt now... I can't get it to keep what I put in the file!

Help!

Brad Wilson
Sunday, November 18, 2001

Can you email me the CTY file and tell me which article has the problem?

Joel Spolsky
Sunday, November 18, 2001

It was a file, not an article. I think I've figured out what the problem was.

I originally had an index.html file in the root of my CityDesk project. I wanted to convert this to index.aspx so I could generate ASP.net code into the file as well. I renamed the file within CityDesk. That seems to be the source of my problem, I guess.

I deleted the problem file, and re-imported a clean copy of the .aspx template from hard disk (I'd been editing it with Visual Studio.net). Now the file is correct, and I'm not having any problems editing and updating the file. It published okay, and processed the CityDesk code in it just fine.

My guess is the rename from .html to .aspx is what caused the trouble. Like a dufus, I didn't think to back up the .cty file before trying to fix it, so now I don't have the broken .cty file any more. :( Hopefully you'll be able to re-produce it...

Brad Wilson
Sunday, November 18, 2001

We've got a strange bug somewhere that we haven't been able to track down which causes extra garbage to appear, occasionally, after the closing </html> tag. It appears that even if you delete the garbage and save, it comes right back. We'll keep working on tracking it down. For now, though, quitting CityDesk and restarting always fixes the problem.

Joel Spolsky
Sunday, November 18, 2001

That's an issue in this case. I'm using ASP.net to generate the bulk of the page, which means that the .aspx file is a bundle of code with some HTML in the middle. Definitely no opening or closing <html> tag anywhere in sight...

Brad Wilson
Sunday, November 18, 2001


Call me a troll, but I think CityDesk is _not_ the tool for you ASP/ASPX/JSP guys out there.

Leonardo Herrera
Sunday, November 18, 2001

Why not?

There are two intended classes of users for the product: those who create articles, and those who lay out the results. Why would CityDesk be an inappropriate tool, given its ease of use for the former user? And why prohibit the latter user from using existing technologies like ASP to ensure a consistent look and feel across the entire site, including the articles?

Brad Wilson
Sunday, November 18, 2001


Because you are trying to use an application not designed for what you want to do.

If you need access to databases, ASP, and you have separated people doing layout and managing content, probably you need a more advanced (and probably more expensive) CMS.

(sorry for my english :-))

Leonardo Herrera
Monday, November 19, 2001

Leonardo Herrera is just plain wrong here.  You can easily use CityDesk to manage a site that uses ASP, JSP, XML whatever... its just a text transformation and if you set it up right, CityDesk can work wonders.

Don't discourage Brad from seeing what the capabilities of CityDesk are for himself.

Michael Pryor
Monday, November 19, 2001

Oh, I'm not discouraged. :) I am now generating ASP.net just fine. It appears to have been the "junk after </html>" bug that you mentioned. When I start with something blank, rather than an HTML template, it edits and generates just fine (and ASP.net accepts it), both directly for files, and for templates (I have an ASP.net template generating my articles as well).

Thanks!

Brad Wilson
Monday, November 19, 2001


Don't misunderstand what I'm trying to say here (is easy to misunderstand me, my english is not very well). What I'm trying to say is "CityDesk is _not_ designed to work with ASP", wich is quite true. You can say the same sentence respect other programs, like Notepad, and still be right.

I perfectly understand that some advanced users can manage to use CityDesk with ASP, JSP, ASPX, Java Sources, perl/POD... but the program is not designed with that in mind. Probably, when you were designing it you though "hey, you can even use CityDesk with ASP!", but that doesn'y qualify as "designed to work with".

Please, don't misunderstand me... I'm planning to use CityDesk myself, and probably I'll set up another copy for my wife. I believe is a terrific tool, and everything else; but I still don't buy some scenarios that have been discussed here.

(I still believe is a great tool... oops, repeating myself)

Leonardo Herrera
Tuesday, November 20, 2001

I'm trying to understand your objection to using CityDesk to generate ASP. At the end of the day, CityDesk is a generative tool that's dumping text. What does it matter whether it's pure HTML with .html extensions, or HTML with embedded ASP with .asp extensions? It's all the same thing.

If you don't think it's designed to do this, what would make it more designed to do this in your mind?

Brad Wilson
Wednesday, November 21, 2001

*  Recent Topics

*  Fog Creek Home