Wednesday, February 3, 2010

Microsoft Visual Studio 2008

How do I change the default browser used in Visual Studio 2008

• Right click a page (.aspx, or on a folder)
• Select Browse With...
• Choose your browser
• Click set as Default



ASP.NET MVC
• Right click on Default.aspx
• Select Browse With...
• Choose your browser
• Click set as Default

How do I reload the cache of a website when pressing the start button (F5) in Visual Studio 2008

To reload the cache of the browser in Visual Studio 2008 when you've clicked the start button do the following:

• Once the browser has loaded up press and hold down the CTRL + F5 key.

How do I use a stored procedure with the linq data source
To use a stored procedure with the linq data source set the linq data sources ContextTypeName property to the DataContext class and create an OnSelecting method for the linq data source returning the stored procedure in the OnSelecting method. Below is an example to help explain the steps I've taken. In your .ascx, .aspx, etc file the linq data source should look something like below:

And your code behind will look something like the following:


How do I maintain the pages current position when inserting or updating a row in a GridView
To maintain the pages current position when inserting or updating a row in a GridView set your pages maintainScrollPositionOnPostBack attribute in the web.config to true as shown below:

No comments:

Post a Comment