Monday, 23 April 2007

Windows 2003 POP3 CatchAll

To facilitate a catch-all address on Windows 2003 you need to run the scripts downloaded from here:

http://isorecorder.alexfeinman.com/catchall.htm

These have been downloaded to Sever1\\Install\Microsoft\Windows2003\MailCatchAll

Wednesday, 11 April 2007

PageRequestManagerParserErrorException exporting grid

Had code to export grid but was receiving the error PageRequestManagerParserErrorException.
This appears to be due to the Export button being on a Ajax UpdatePanel and the ScriptManager having PartialUpdates set to false.
There doesn't currently appear to be any work around to fix this other than the button being removed from the UpdatePanel.

Thursday, 5 April 2007

NHibernate:Unknown entity class:

Error "Unknown entity class: " occurs when either no mapping file exists for specifed or the mapping file is not flagged as embedded resource.

Tuesday, 3 April 2007

AJax Calendar extender date format

The date format of the Calendar extender seesm to be mm/dd/yyyy.
To change it to culture specific:
  • Set Page Culture="auto"
  • Set Page UICulture="auto"
  • Set ScriptManager EnableScriptGlobalization="true"
  • Set ScriptManager EnableScriptLocalization="true"

Wednesday, 28 March 2007

GridView : Getting updated cell values

When using a gridview the RowUpdating event arguments has a property (e.)NewValues.
There is a problem if the GridView datasource is not set to s DataSourceObject, these NewValues remain blank.
To populate use the following code:
GridView gv = (GridView)sender;
for (int i = 0; i < gridView.Columns.Count; i++)
{
DataControlFieldCell cell = gv.Rows[e.RowIndex].Cells[i] as DataControlFieldCell;
gv.Columns[i].ExtractValuesFromCell(e.NewValues, cell, DataControlRowState.Edit, true);
}

Monday, 26 March 2007

Nhibernate: Date time field null on insert

Receiving exception when trying to save a record the stack tarce identified theproblem as a null value for a DateTime field.
This is caused by either:
  1. Property not marked as nullable (? after Type in property declaration)
  2. Existing record being flushed that contains an invalid null value for datetime.

NHibernate: Object not set to instance on save

When saving I received 'Object not set to instance', from the stack trace the object in question was identified as the VerisionNo.
This was correctly defined for the table in question, after investigation it was identifeid as being a link table that was being flushed which had an existing record with a Null value for the VersionNo.
This record had been either manually entered or entered prior to the versionNo field being defined as NotNull.