-
Visual Studio keyboard shortcut to apply uppercase/lowercase to selection
Posted on October 29th, 2009 No commentsSo I’ve been doing this for a while manually (especially considering the performance benefit of UPPERINVARIANT over LOWERINVARIANT) but recently took the time to Google and see if there’s an automated way to do this and alas, there is. Google sent me to Sara Ford’s blog where it mentions the shortcuts.
- Press Ctrl+Shift+U to make the current character or selected characters uppercase
- Press Ctrl+U to make the current character or selected characters lowercase
Good to know!
-
Multi-process and multi-threaded debugger issues (VS2008)
Posted on October 8th, 2009 No commentsI recently got an email from a coworker about a new (well, new to me) hotfix for VS2008. We’ve been working on a heavily multi-threaded application and apparently all have had issues regarding both debugger breakpoints and using “step into” when running the VS2008 debugger. As common as I’ve seen this in my environment and obviously it is happening in his too, just thought I’d post it out there on the web so others could enjoy a somewhat correctly functioning debugger for multi-threaded processes.
Basically, in my environment, VS2008′s debugger would simply ignore some breakpoints when multiple threads were flying around.
Enjoy!
This explains the problem:
Updates for Visual Studio 2008 SP1 debugging and breakpointsThis gives a link to download the hotfix:
KB957912 – Update for Visual Studio 2008 SP1 Debugging and Breakpoints -
Copy and paste to Visual Studio ASP.NET page from SQL Management Studio
Posted on May 1st, 2009 No commentsAs I’m bringing over some older posts from my previous blog, I thought this one might be helpful to some (notice I was using VS2005 at the time but this also works for VS2008).
So I was doing some grunt work of making a few textboxes which will be filled from a SQL table from a remote database. I decided to pop open SQL Management Studio in my second monitor and copy the field names straight from the table and paste them onto the ASP.Net page. I clicked on a field name and unknowingly left the whole row selected, hit CTRL-C, and then pasted right into the ASP.Net page. To my surprise, a Gridview showed up and its related datasource. Also, connection string was added to my Web.config. I was not aware of this functionality at all but I thought I’d post it as it could save some time for a few people.
1. With Visual Studio 2005 .NET open to an ASPX page, open SQL Management Studio.
2. Right click on the table you want to create a Gridview with and select ‘Design’.
3. Highlight the field(s) you want to show in the Gridview (use shift-select for multiples).
4. Press CTRL-C to copy to the clipboard.
5. Place the cursor in the ASPX page where you want the Gridview to appear and press CTRL-V.
6. That’s it! You will have a simple Gridview with the fields you selected, a SqlDataSource underneath it, and a connection string in your Web.Config.Here’s an example of the resulting ASPX output:
<asp:GridView ID="GridView1" runat="server" DataSourceID="SqlDataSource2" EmptyDataText="There are no data records to display." AutoGenerateColumns="False"> <Columns> <asp:BoundField DataField="Processor" SortExpression="Processor" HeaderText="Processor"></asp:BoundField> <asp:BoundField DataField="MinAmount" SortExpression="MinAmount" HeaderText="MinAmount"></asp:BoundField> <asp:BoundField DataField="Requestor" SortExpression="Requestor" HeaderText="Requestor"></asp:BoundField> <asp:BoundField DataField="OutputFilesPath" SortExpression="OutputFilesPath" HeaderText="OutputFilesPath"></asp:BoundField> </Columns> </asp:GridView> <asp:SqlDataSource ID="SqlDataSource1" runat="server" SelectCommand="SELECT [Processor], [MinAmount], [Requestor], [OutputFilesPath] FROM [tbl_Settings]” ConnectionString=”<%$ ConnectionStrings:MPConnectionString1 %>” ProviderName=”<%$ ConnectionStrings:MPConnectionString1.ProviderName %>”> </asp:SqlDataSource>

