in

ASP.NET Weblogs

Brian Desmond's Blog

Inherits Network.Admin
Implements IOneManBand

February 2004 - Posts

  • Debugger Error Solution

    I thought I'd post a solution to a debug issue I had today. I've had it before, and now I'll be able to google my blog for the solution.

    When trying to debug a WinForms app, VS reports “The debugger is not properly installed.  Run setup to install or repair the debugger.”'

    This is pretty easy to fix. Close out VS, and open a command prompt.

    Browse to %ProgramFiles%\Common Files\Microsoft Shared\VS7Debug

    reregister each of the dll's (e.g. regsvr32 coloader.dll), and then run mdm and vs7jit with a /regserver switch (e.g. vs7jit /regserver).

    Load up VS again, and it should be fixed.

    Posted Feb 24 2004, 04:39 PM by bdesmond with 1 comment(s)
    Filed under:
  • Testing FOR XML SProcs

    I'm curious how other people do this. I can't figure out how to easily check the output of an SPROC which does a FOR XML. I tried copying the textual output to VS and then hitting the format code button, but there's some sort of wrapping issue, so the XML is invalid.
    Posted Feb 20 2004, 06:22 PM by bdesmond with 2 comment(s)
    Filed under:
  • Datagrid Sorting with Viewstate Disabled

    I learnt how to enable sorting on a datagrid with Viewstate disabled for the grid. Quite simple, actually - here's how:

    You have to rebind on every page load, and manually put the SortExpression in Viewstate:

    Sub Page_Load (sender as Object, e as EventArgs) Handles MyBase.Load
         ' Note that you CANNOT enclose in the usual If Not Page.IsPostback block!
         
          myGrid.DataSource = myDataSet
          myGrid.DataBind()
    End Sub

    Sub myGrid_SortCommand(sender as Object, e as DatagridSortCommandEventArgs)
          Viewstate(“SortExpression“) = e.SortExpression

          myGrid.DataSource = mySortedDataset
          myGrid.DataBind()
    End Sub

    That's it! You'll, of course, find your page size to be much much smaller if viewstate is disabled on the grid.

    Posted Feb 01 2004, 06:55 PM by bdesmond with no comments
    Filed under:
More Posts