Compiling error when you have a tabled named Color

This public forum is for user-to-user discussions of ASP.NET Maker. Note that this is not support forum.
Post Reply
smernesto
User
Posts: 1

Compiling error when you have a tabled named Color

Post by smernesto »

Hi,

I have a database with many tables, one of the tables is named 'Color'. I generated the site using ASP.NET MAKER trial 12.0.3 but when it tries to compile it generate some errors on the file aspxfn12.cs in the line 5463 and other lines where the System.Drawing.Color class is used. I guess the compiler doesn't know which Color class to use so it generates an error. If I modify the .cs file and in every line where the Color class is used and write instead System.Drawing.Color the code can be compiled.

Thank you.

Here is the code

[code]
Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS1061: 'AspNetMaker12_ZazuAdministrator_base.cColor' does not contain a definition for 'White' and no extension method 'White' accepting a first argument of type 'AspNetMaker12_ZazuAdministrator_base.cColor' could be found (are you missing a using directive or an assembly reference?)

Source Error:

Line 5461: System.Drawing.Image bitmap = new Bitmap(width, h);
Line 5462: var g = Graphics.FromImage(bitmap);
Line 5463: g.Clear(Color.White);
Line 5464: Brush b = new SolidBrush(Color.Red);
Line 5465: g.DrawString(txt, new System.Drawing.Font(font, pt), b, 0, (int)Math.Round(Convert.ToDouble((h - fs)/2)));
[/code]


Webmaster
User
Posts: 9430

Post by Webmaster »

Add the keyword "Color" to the keyword file (C:\Program Files (x86)\ASP.NET Maker 12\src\keyword.xml) as follow, close and open your project and regenerate all files again.

<keyword lang="*" value="Color"/>


Post Reply