473,287 Members | 1,866 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,287 software developers and data experts.

Unable to generate code...

Hello, i am having this problem. The exact error message is:

"Unable to generate code for a value of type 'System.Web.UI.Page'. This
error occurred while trying to generate the property value for Page."

After a lot of googling, all i can find that this applies to is when trying
to use enum-type datatypes as bit-vector flags, or when use designers to
make an expandable property in the property tool-window. However, NEITHer of
these cases apply to my page. This is only happening on one page in the
project. But the stack trace of the error (included at the end) gives me no
hint of where to even start looking to fix it, of WHAt exactly might be
wrong with the page.

Thanks in advance,
- Arthur Dent.

================================================== =

<stackTrace>
[HttpException (0x80004005): Unable to generate code for a value of type
'System.Web.UI.Page'. This error occurred while trying to generate the
property value for Page.]
System.Web.Compilation.CodeDomUtility.GenerateExpr essionForValue(PropertyInfo
propertyInfo, Object value, Type valueType) +2369
System.Web.Compilation.TemplateControlCompiler.Bui ldBuildMethod(ControlBuilder
builder, Boolean fTemplate, PropertySetterEntry pse) +2545
System.Web.Compilation.TemplateControlCompiler.Bui ldSourceDataTreeFromBuilder(ControlBuilder
builder, Boolean fInTemplate, PropertySetterEntry pse) +794
System.Web.Compilation.TemplateControlCompiler.Bui ldSourceDataTreeFromBuilder(ControlBuilder
builder, Boolean fInTemplate, PropertySetterEntry pse) +352
System.Web.Compilation.TemplateControlCompiler.Bui ldSourceDataTreeFromBuilder(ControlBuilder
builder, Boolean fInTemplate, PropertySetterEntry pse) +352
System.Web.Compilation.TemplateControlCompiler.Bui ldSourceDataTreeFromBuilder(ControlBuilder
builder, Boolean fInTemplate, PropertySetterEntry pse) +352
System.Web.Compilation.TemplateControlCompiler.Bui ldMiscClassMembers()
+51
System.Web.Compilation.PageCompiler.BuildMiscClass Members() +9
System.Web.Compilation.BaseCompiler.BuildSourceDat aTree() +1279
System.Web.Compilation.BaseCompiler.GetCompiledTyp e() +129
System.Web.UI.PageParser.CompileIntoType() +59
System.Web.UI.TemplateParser.GetParserCacheItemThr oughCompilation() +126

[HttpException (0x80004005): Unable to generate code for a value of type
'System.Web.UI.Page'. This error occurred while trying to generate the
property value for Page.]
System.Web.UI.TemplateParser.GetParserCacheItemInt ernal(Boolean
fCreateIfNotFound) +692
System.Web.UI.TemplateParser.GetParserCacheItemWit hNewConfigPath() +125
System.Web.UI.TemplateParser.GetParserCacheItem() +88
System.Web.UI.TemplateControlParser.CompileAndGetP arserCacheItem(String
virtualPath, String inputFile, HttpContext context) +116
System.Web.UI.TemplateControlParser.GetCompiledIns tance(String
virtualPath, String inputFile, HttpContext context) +36
System.Web.UI.PageParser.GetCompiledPageInstanceIn ternal(String
virtualPath, String inputFile, HttpContext context) +43
System.Web.UI.PageHandlerFactory.GetHandler(HttpCo ntext context, String
requestType, String url, String path) +44
System.Web.HttpApplication.MapHttpHandler(HttpCont ext context, String
requestType, String path, String pathTranslated, Boolean useAppConfig) +699
System.Web.MapHandlerExecutionStep.System.Web.Http Application+IExecutionStep.Execute()
+95
System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean&
completedSynchronously) +173
</stackTrace>
Nov 18 '05 #1
1 2290
Well, i finally figured it out, after a day of piece-by-piece rebuilding my
page.

I had a TD tag in my html code which i set to runat="server". I then added
on an attribute named "page" where i was going to keep track of the custom
page my grid was on (im paging by alpha-filters instead of numeric page
numbers). When the page tried to render this control though, it was now an
HtmlTableCell object, which has a Page property (derived from Control
class). It thought i was trying to set that property = "" and it got all
confused. By simply changing the name of my custom attribute from "page" to
"pageindex", it works again. Apparently on a runat=server HTML tag, the
framework will try to interpret any attributes specified as .NET Properties
first, and if there isnt one by that name, then it treats them as HTML
Attributes.

CheerZ.

"A Traveler" <hi*********************@yahoo.com> wrote in message
news:uE**************@TK2MSFTNGP09.phx.gbl...
Hello, i am having this problem. The exact error message is:

"Unable to generate code for a value of type 'System.Web.UI.Page'. This
error occurred while trying to generate the property value for Page."

After a lot of googling, all i can find that this applies to is when
trying to use enum-type datatypes as bit-vector flags, or when use
designers to make an expandable property in the property tool-window.
However, NEITHer of these cases apply to my page. This is only happening
on one page in the project. But the stack trace of the error (included at
the end) gives me no hint of where to even start looking to fix it, of
WHAt exactly might be wrong with the page.

Thanks in advance,
- Arthur Dent.

================================================== =

<stackTrace>
[HttpException (0x80004005): Unable to generate code for a value of type
'System.Web.UI.Page'. This error occurred while trying to generate the
property value for Page.]

System.Web.Compilation.CodeDomUtility.GenerateExpr essionForValue(PropertyInfo
propertyInfo, Object value, Type valueType) +2369

System.Web.Compilation.TemplateControlCompiler.Bui ldBuildMethod(ControlBuilder
builder, Boolean fTemplate, PropertySetterEntry pse) +2545

System.Web.Compilation.TemplateControlCompiler.Bui ldSourceDataTreeFromBuilder(ControlBuilder
builder, Boolean fInTemplate, PropertySetterEntry pse) +794

System.Web.Compilation.TemplateControlCompiler.Bui ldSourceDataTreeFromBuilder(ControlBuilder
builder, Boolean fInTemplate, PropertySetterEntry pse) +352

System.Web.Compilation.TemplateControlCompiler.Bui ldSourceDataTreeFromBuilder(ControlBuilder
builder, Boolean fInTemplate, PropertySetterEntry pse) +352

System.Web.Compilation.TemplateControlCompiler.Bui ldSourceDataTreeFromBuilder(ControlBuilder
builder, Boolean fInTemplate, PropertySetterEntry pse) +352
System.Web.Compilation.TemplateControlCompiler.Bui ldMiscClassMembers()
+51
System.Web.Compilation.PageCompiler.BuildMiscClass Members() +9
System.Web.Compilation.BaseCompiler.BuildSourceDat aTree() +1279
System.Web.Compilation.BaseCompiler.GetCompiledTyp e() +129
System.Web.UI.PageParser.CompileIntoType() +59
System.Web.UI.TemplateParser.GetParserCacheItemThr oughCompilation() +126

[HttpException (0x80004005): Unable to generate code for a value of type
'System.Web.UI.Page'. This error occurred while trying to generate the
property value for Page.]
System.Web.UI.TemplateParser.GetParserCacheItemInt ernal(Boolean
fCreateIfNotFound) +692
System.Web.UI.TemplateParser.GetParserCacheItemWit hNewConfigPath() +125
System.Web.UI.TemplateParser.GetParserCacheItem() +88
System.Web.UI.TemplateControlParser.CompileAndGetP arserCacheItem(String
virtualPath, String inputFile, HttpContext context) +116
System.Web.UI.TemplateControlParser.GetCompiledIns tance(String
virtualPath, String inputFile, HttpContext context) +36
System.Web.UI.PageParser.GetCompiledPageInstanceIn ternal(String
virtualPath, String inputFile, HttpContext context) +43
System.Web.UI.PageHandlerFactory.GetHandler(HttpCo ntext context, String
requestType, String url, String path) +44
System.Web.HttpApplication.MapHttpHandler(HttpCont ext context, String
requestType, String path, String pathTranslated, Boolean useAppConfig)
+699

System.Web.MapHandlerExecutionStep.System.Web.Http Application+IExecutionStep.Execute()
+95
System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean&
completedSynchronously) +173
</stackTrace>

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: jtsree | last post by:
i am using Visual Studio.net professional 2003 (VisualBasic.net).I am building a very very simple project where i need to connect to Microsoft access database through OledbDataAdapter in design...
1
by: jtsree | last post by:
I am Using (Windows XP) Visual Studio.net 2003 professional edition working on VB.net language. I am bulding a very very simple project in VB.net where i connect to Access Database by dragging...
4
by: Chris Bower | last post by:
Reposted from aspnet.buildingcontrols: Ok, I've got a bunch of derived controls that all have a property Rights of type Rights (Rights is an Enumerator). I wrote a custom TypeConverter so that I...
6
by: Prashant Bhuptani | last post by:
Hi Guys, I am trying to use a C++ dll in VB.NET code. I have imported the dll in the following manner: <code> Imports System.Runtime.InteropServices
0
by: kent.anderson | last post by:
I am getting the following error when attempting to generate C# proxy code with the wsdl.exe tool: Error: Unable to import binding 'XtractSoapBinding' from namespace 'http://xtrac...
1
by: kent.anderson | last post by:
I am getting the following error when attempting to generate C# proxy code with the wsdl.exe tool: Error: Unable to import binding '...' from namespace '...'. - Unable to import operation '...'....
4
by: Abi | last post by:
We able to generate this error in our test environment and were able to research this enough to understand that the issue is NOT with an abject that needs to be serialized but rather as the stack...
2
by: UJ | last post by:
I've got a web service that is giving me back this error message. The directory is Windows\Temp and I have given everybody complete access to this directory and am still getting the error. Any...
8
by: =?Utf-8?B?RGFuTQ==?= | last post by:
Can someone help with the following problem. I am sending an encrypted SOAP message to a .NET 2.0 + WSE 3.0 web service. When .NET attempts to decrypt the message it cannot read the private key...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.