Showing posts with label VS. Show all posts
Showing posts with label VS. Show all posts

Database Installation using VS setup

Database installation is common task in setup programming.Here are the steps to install sql server database with setup using custom action. the summary is following

How to change Target Framework of websites in VS2008

In vs 2008, we can set target framework of our application. We can upgrade existing .NET Framework 2.0 app to 3.5 to use advance feature or can change new app to .NET framework 2.0 to make it compatible with old environment.


In Solution Explorer, Right Click on website and open Property Pages
Click on Build option and Update Target Framework option.

Add static items(more than 100) in List in less than 10 Sec using Visual Studio

Sometime the task is done quickly using regular expression. "Find & Replace" with "Regular Expression" !!! What's Combination Amazing!!! and can save our time to do huge boring tasks in few seconds.


Generally we are given an excel sheet and said that this column should be appear in drop down list and these are static then How can we insert items quickly
1. Copy Excel Sheet Column which is to be appeared in dropdownlist or Items from text file and Paste in source code file.
2. Select all items.
3. In Visual Studio -> Edit -> Find and Replace and put following thing
Find What: {.+}
Look in: Selection
Use: Regular Expression
Replace With:
<li>\1</li> (HTML List)
<option>\1</option>(HTML Drop Down)
<asp:ListItem>\1</asp:ListItem> (ASP.NET Listbox and DropDown Items)
4. Add Start tag and end tag of control before and after selection.


Don’t forget to say Thanks If it helps.

Visual Studio keyboard shortcuts

If you are a .NET Developer and using Visual studio then you must know visual studio keyboard shortcuts. my favorite Visual Studio keyboard shortcuts (I am leaving out the really obvious ones like F5).
• CTRL+ALT+L: View Solution Explorer. I use Auto Hide for all of my tool windows to maximize screen real estate. Whenever I need to open the Solution Explorer, it’s just a shortcut away. Related shortcuts: CTRL+ALT+X (Toolbox), F4 (Properties), CTRL+ALT+O (Output), CTRL+\, E (Error List), CTRL+\, T (Task List).
• F12: Go to definition of a variable, object, or function.
• SHIFT+F12: Find all references of a function or variable.
• F7: Toggle between Designer and Source views.
• CTRL+PgDn: Toggle between Design and Source View in HTML editor.
• F10: Debug - step over. Related debugging shortcuts: F11 (debug - step into), SHIFT-F11 (debug - step out), CTRL-F10 (debug - run to cursor). F9 (toggle breakpoint).
• CTRL+D or CTRL+/: Find combo (see section on Find Combo below).
• CTRL+M, O: Collapse to Definitions. This is usually the first thing I do when opening up a new class.
• CTRL+K, CTRL+C: Comment block. CTRL+K, CTRL-U (uncomment selected block).
• CTRL+-: Go back to the previous location in the navigation history.
• ALT+B, B: Build Solution. Related shortcuts: ALT+B, U (build selected Project), ALT+B, R (rebuild Solution).
• CTRL+ALT+Down Arrow: Show dropdown of currently open files. Type the first few letters of the file you want to select.
• CTRL+K, CTRL+D: Format code.
• CTRL+L: Delete entire line.
• CTRL+G: Go to line number. This is useful when you are looking at an exception stack trace and want to go to the offending line number.
• SHIFT+ALT+Enter: Toggle full screen mode. This is especially useful if you have a small monitor. Since I upgraded to dual 17" monitors, I no longer needed to use full screen mode.
• CTRL+K, X: Insert "surrounds with" code snippet. See Snippets tip below.
• CTRL+B, T: Toggle bookmark. Related: CTRL+B, N (next bookmark), CTRL+B, P (prev bookmark).