1. To find out the what version of Microsoft SQL you are running, execute the following T-SQL command: Select @@Version.  Here is a link for more information.

    2. With the ToString() method, there is a method overload that allows you to perform formatting. For example,


Dim decimalCount As New Decimal

decimalCount = cmd.ExecuteScalar()
Return decimalCount.ToString("##0.0")

    1. Sys.WebForms.PageRequestManagerParserErrorException - what it is and how to avoid it


I had to work around this error recently, when trying to render an Excel spreadsheet in an ASP.NET application.  The crux of the problem is the AJAX Update panel.  The client javascript for the update panel gets confused when rendering HTML in "partial PostBack mode."   The quick fix for me, was to added a PostBack trigger to the Update Panel that pointed to the button that started the Excel spreadsheet creation.  This step forced the application to do a normal PostBack.  For a more detailed explanation, follow the link above.


  1. Setting ViewState items in Page_Init sub of code behind did not persist.  That is, the settings disappear.  Moved settings to Page_Load and the settings persisted. 09/12/2008 ViewState loaded in PreLoad Page Event.  See ASP.NET Page Life Cycle Overview and ASP.NET Application Life Cycle Overview.
  2. To remove commas from text fields, try the Decimal.Parse method.  For example, Decimal.Parse(txtDollarAmount.Text).