Posted by admin at 30 August 2010

Category: SQL Server

Tags: ,

Here is a good link from MSDN that explains how to deploy database changes to an exsisting database.

http://msdn.microsoft.com/en-us/library/ff754344.aspx

Posted by admin at 10 August 2010

Category: Uncategorized

A fast way to get a list you can copy into a code file with all the fields in a table.

select COLUMN_NAME from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME = ‘tablename’

Posted by admin at 8 August 2010

Category: Uncategorized

Entity Framework (EF) does not support lazy loading. You must explicitly load the comments advising the EF what to include.

Using ctx as new MyDataContext()

lvComments.DataSource = ctx.Entity.Include(“SomethingToInclude”).First().Comments
lvComments.Databind()

End Using

Or

Using ctx as new MyDataContext()

Dim MyListOfSomething as List(of ListOfSomething) = ctx.ListOfSomething
MyListOfSomething.SomethingToLoad.Load()
lvComments.DataSource = MyListOfSomething.Comments
lvComments.DataBind()

End Using

Posted by admin at 19 July 2010

Category: Uncategorized

The problem: no .csproj file in websites

The solution: http://www.dotnetsizzler.com/post/Using-MS-Build-in-ASPNET-Website.aspx Add a proj file to the website, and set up the build to use it.  http://en.csharp-online.net/MSBuild:_By_Example%E2%80%94Dealing_with_MSBuild_Errors

Posted by admin at 12 July 2010

Category: Uncategorized

Here are a few ways to get the value of an asp textbox

  1. document.getElementById(‘<%=Test.ClientID%>’).value
  2. <%=txtMyTextBox.ClientID%>
  3. Response.Redirect(“Form2.aspx?name=” + txtName.Text + “&num=” + txtStNum.Text );

Posted by admin at 12 July 2010

Category: Testing

Pex automatically generates test from Visual Studio code editor. It tries interesting sets of input and output of a method. This provide a high level of test coverage automatically. Currently it is a Visual Studio add in for testing .NET Framework Applications

Moles supports Unit Testing by isolation with detours and stubs.

http://research.microsoft.com/en-us/projects/pex/

You can try it out online with no install at: http://www.pexforfun.com/

Posted by admin at 25 May 2010

Category: Uncategorized

String.Join(“,”,Array.ConvertAll(list.ToArray(),element => element.ToString()));

Posted by admin at 26 April 2010

Category: Testing

Tags: , , ,

Website Application Testing Procedures

How to test software

1) Functionality Testing

Links, Forms, Getting and Setting Data, Validating
2) Usability testing
        Navigation, Content
3) Interface testing
        Error Handling, Connections
4) Compatibility testing
        Cross Browser, Printer, Mobile
5) Performance testing
        Load Testing, Stress Testing
6) Security testing
        Spam, Hacking, URLs, Scripting attacks

Posted by admin at 31 March 2010

Category: Uncategorized

For entity framework, you should use ObjectContext.AddObject() instead of Linq to SQL DataContext.TableName.Add()

Posted by admin at 24 March 2010

Category: Security

Framework 4

http://msdn.microsoft.com/en-us/library/89211k9b(VS.100).aspx