Question

I am using a Session Parameter on an ObjectDataSource. It works fine on the local development machine but I get this error after copying the website to the production server:

Type 'System.Web.UI.WebControls.SessionParameter' does not have a public property named 'DbType'.

Was it helpful?

Solution

Me again!

First Answer I gave was WRONG!
Correct answer is that .NET Framework v3.5 was installed, and it needs to be updated to .NET framework 3.5 SP1

OTHER TIPS

I found the answer but I don't know why it does this.

I just removed the DBType property and it worked fine.

I change DbType to Type and this got the site working.

The solution is replace DBType by Type. And find the Ansi especification.

By example I have this code:

DBType ="AnsiString"  

an change it by

Type="String"  

and working fine.

Travis' answer gave me a clue, but perhaps it could be stated better thusly:

Somehow, in copying the website to the production server, a number of the parameter objects (Specifically, those with type GUID) had the "Type"="Guid" element changed to "DBType"="Guid".

e.g parameter should be:

NOT

Confirmed: This requires .NET Framework 3.5 SP1 update.

Wow I also removed DbType="Date" and it started working. did'nt even bother publishing, just changed it on the server with notepad. Thanks

well. you should change it. eg. if it is DbType="Guid" then change it to Type="Object"

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top