Archives / 2004 / October

  • ASP.NET Testing

    Friday, October 29, 2004
    This is more of a survey than an informational entry, but I'm just kind of curious if anyone has done any UI testing for ASP.NET.  If so, what would you recommend?  Please leave comments...thanks!  :)
    Filed under | 5 comments »
  • Change Owner of an Object in SQL Server 2000

    Friday, October 29, 2004
    This is mostly just a post for me so I never forget this, but to change the owner of an object in sql server, use sp_changeobjectowner, just pass it the name of the object (as a string) and the name of the new owner (as a string) UPDATE: Thanks to Matthew Gibson for correcting my typo on the stored procedure to call.
  • Quick Validation Hack for ASP.NET

    Wednesday, October 27, 2004
    So in the current project I'm working on, I have a calculated field in a hidden field (server control) and I wanted an actual textbox on the page to validate against that hidden value using the CompareValidator, but unfortunately, it won't compare against hidden fields (even though it's a server control).  So what's the way around this?  Instead of a hidden field, make it a TextBox Server Control and add style="display:none" onto it, so it doesn't show up and the CompareValidator will work just fine.  This is kind of silly, but it works!
    Filed under | 8 comments »
  • Cool Whidbey Data Feature

    Thursday, October 14, 2004
    Was just in a chat and found out about a new feature called "Smart Captions".  When you drag a table out from the Data Sources Window specified to be a Detail View, it will create all the Labels and TextBoxes (or whatever is appropriate for that field).  Smart Captions will take a field named "FirstName" and set the Label's Text Property to "First Name".  How cool is that?  Thanks, Microsoft!
  • Strange DataTable Behavior

    Wednesday, October 13, 2004
    Today, I ran into what I think is a bug in DataTable.  I created a table with two fields as the primary key and one other varchar field that is named the same name as the table.  Probably not a best practice, but hey, it made sense for once.  Let's say my table is named MyTable.  I have two fields in the PK named, MyOtherTable1ID and MyOtherTable2ID and a varchar field called MyTable. Now, when I load that into a DataTable (in my case a persisted DataSet using ReadXml), this is now my Columns Collection in the DataTable: MyOtherTable1ID MyOtherTable2ID MyTable_Id MyTable_Id_0
    Filed under | 0 comments »
  • WindowsForms QuickTip: Me.Owner

    Monday, October 04, 2004
    Want to access the parent form when using ShowDialog to show a form?  Consider the following where Form1 is the parent and Form2 is the child to be shown modally. Dim Form2 As New Form2Form2.ShowDialog()Form2.Dispose() If this is in a Button.Click in Form1, this will show Form2 modally from Form1.  Now say you need to access Form1 from Form2 to possibly call a Public Method to set it's StatusBar.Text or whatever. DirectCast(Me.Owner, Form1).SetStatusBarText("I own you!") Unfortunately, this doesn't "just work" like I'd expect (maybe you do too).  So you can do one of two things to get Owner to return
  • MVP Re-Award

    Monday, October 04, 2004
    I got the e-mail on Friday.  I will be an MVP for another year!  :)
    Filed under | 11 comments »