Posts

Unable to Write to Pdb in Visual Studio

It started giving me an error after updating the project from SVN.  The real issue turned out to be that there was missing files. The fix for me was to close an re open project and locate the files that were missing.  The files had actually been deleted, but that was not what visual studio was giving me. http://stackoverflow.com/questions/627523/unable-to-create-pdb-file

The name 'ViewState' Does Not Exist in the Current Context

Say you have something like ViewState("AccountID") in a c# page when trying to use Viewstate.  It will give the error "The name 'ViewState' Does Not Exist in the Current Context".  What is incorrect about the code is you should be using "ViewState["name"]".  Encountered that error from a page conversion to C#.

Vb.NET Has Two Division Operators

There was also a bug with the number of blocks, apparently there are two different division operators in vb / and \, the first is a float division that rounds and the other is integer division.  So I was getting unusual results sometimes, like 16/10 = 2, when I wanted 16\10=1.  http://stackoverflow.com/questions/6013626/vb-net-vs-c-sharp-integer-division?rq=1

System.NotSupportedException

{"Callbacks are not supported on CommandField when the select button is enabled because other controls on your page that are dependent on the selected value of 'grd1' for their rendering will not update in a callback.  Turn callbacks off on 'grd1'."} This error tells you straight up what to do.  Set EnableSortingAndPagingCallbacks to False on the datagrid.

EnableEventValidation="False" and Strange javascript Errors.

We have been moving some stuff from an older DNN 5 professional installation to a newer  DNN 7 Community edition. A module when moved over kept having these unusual errors, and I was given it to figure out the issue.  The datagrid in it stopped being able to sort, or some columns would only sort once.  Other problems were that the OnClick event would only go to the OnLoad page event, instead of going to the datagrid row command event.  There was aPage Setting in the older DNN5 site that once added to the newer Default.aspx page fixed all the errors. That setting is "EnableEventValidation = "False" ".

Layout Page Rendering Multiple Times

Image
We noticed a copyright notice appearing multiple times on the bottom of the page with the jqgrid.  Well, that a rather interesting issue.  The main layout was being called multiple times.   To prevent the main page, the Layout from being called multiple times, it was necessary to return PartialView instead of View.  I guess the rendering of a View, will always try to render the Layout.  Need to investigate more the differences between a PartialView and a View. http://stackoverflow.com/questions/19272720/error-executing-child-request-for-handler-in-view

Resource cannot be found: MVC startup error

Image
Make sure to remove any sort of specific page in property settings for the project.  Also make sure that if you have a page it actually is the correct link for it.