<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>ASP.NET Programming</title><link>http://ericgharrison.com/Blog/category/10.aspx</link><description>ASP.NET Programming</description><managingEditor>Eric G. Harrison</managingEditor><dc:language>en-US</dc:language><generator>.Text Version 0.95.2004.101</generator><item><dc:creator>Eric G. Harrison</dc:creator><title>Paul Vick has a good little posting on the 'native' language of .NET</title><link>http://ericgharrison.com/Blog/archive/2004/06/01/241.aspx</link><pubDate>Tue, 01 Jun 2004 07:03:00 GMT</pubDate><guid>http://ericgharrison.com/Blog/archive/2004/06/01/241.aspx</guid><wfw:comment>http://ericgharrison.com/Blog/comments/241.aspx</wfw:comment><comments>http://ericgharrison.com/Blog/archive/2004/06/01/241.aspx#Feedback</comments><slash:comments>20</slash:comments><wfw:commentRss>http://ericgharrison.com/Blog/comments/commentRss/241.aspx</wfw:commentRss><trackback:ping>http://ericgharrison.com/Blog/services/trackbacks/241.aspx</trackback:ping><description>&lt;A href="http://www.panopticoncentral.net/archive/2004/05/31/1100.aspx"&gt;http://www.panopticoncentral.net/archive/2004/05/31/1100.aspx&lt;/A&gt;&lt;img src ="http://ericgharrison.com/Blog/aggbug/241.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Eric G. Harrison</dc:creator><title>Keyboard and command line shortcuts to know and love...</title><link>http://ericgharrison.com/Blog/archive/2004/05/02/214.aspx</link><pubDate>Sun, 02 May 2004 11:09:00 GMT</pubDate><guid>http://ericgharrison.com/Blog/archive/2004/05/02/214.aspx</guid><wfw:comment>http://ericgharrison.com/Blog/comments/214.aspx</wfw:comment><comments>http://ericgharrison.com/Blog/archive/2004/05/02/214.aspx#Feedback</comments><slash:comments>14</slash:comments><wfw:commentRss>http://ericgharrison.com/Blog/comments/commentRss/214.aspx</wfw:commentRss><trackback:ping>http://ericgharrison.com/Blog/services/trackbacks/214.aspx</trackback:ping><description>&lt;P&gt;&lt;FONT size=2&gt;&lt;FONT face=Arial&gt;Sometimes, it is all too easy to learn just enough within our respective environments&amp;nbsp;to do our jobs (or hobby), and&amp;nbsp;then focus on that, rather than learning our tools better.&amp;nbsp; Today, we're going to go through some shortcuts that we should all know, and use.&amp;nbsp; After all, if you can keep your hand away from the mouse, you're working smarter, not harder!&lt;/FONT&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;First, lets talk about command prompt (cmd.exe, not command.exe - which is merely DOS) shortcut keys.&amp;nbsp; I'm assuming that you're using Windows XP for development.&amp;nbsp; Most of these will work on Windows 2000 as well.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;One of the niftiest things is using the &lt;STRONG&gt;TAB&lt;/STRONG&gt; key for file name completion.&amp;nbsp; For example, at the command prompt, go to c:\windows\system32 directory (assuming it's your Windows directory of course), and then type &lt;STRONG&gt;DIR E&lt;/STRONG&gt; and then the tab key.&amp;nbsp; As you press the tab key, each file that starts with E will display.&amp;nbsp; This is handy when editing files, but it's even more handy when changing directories.&amp;nbsp; Just press &lt;STRONG&gt;TAB&lt;/STRONG&gt; whenever you want a directory name to be completed.&amp;nbsp; &lt;A href="http://weblogs.asp.net/jkey/"&gt;Jeff Key&lt;/A&gt; also pointed out that you can use masks here as well.&amp;nbsp; Type &lt;STRONG&gt;DIR ED*&lt;/STRONG&gt; and then start &lt;STRONG&gt;TAB&lt;/STRONG&gt;bing and only files start start with ED will be listed.&amp;nbsp; This feature is really handy when your trying to edit MyReallyLongAppName.exe.config - just type &lt;STRONG&gt;NOTEPAD My&lt;/STRONG&gt; and then tab a few times to get the .config file.&amp;nbsp; Remember, use this for &lt;STRONG&gt;CD&lt;/STRONG&gt; as well!&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;&amp;#8220;Directory stacking&amp;#8220; is a feature that almost no one knows about.&amp;nbsp; Let's say your working in a directory that's 28 levels deep, like &amp;#8220;c:\dev\developers\eric\samples\IPCommunication&amp;#8220;, and you need to go up to C:\Windows\System32\Etc so you can fix up the HOSTS file.&amp;nbsp; The fastest way to do this is to type &lt;STRONG&gt;PUSHD c:\windows\system32\etc&lt;/STRONG&gt; and enter.&amp;nbsp; That will do essentially the same thing as CD, however, when you want to return to the directory that you were in before you did the pushd, all you need to do is type &lt;STRONG&gt;POPD&lt;/STRONG&gt;, and voila!&amp;nbsp; Since it is doing stacking, you can pile on the pushd's and popd them off as needed.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;Now onto other shortcuts.&amp;nbsp; Many of us forget that we can set up &lt;STRONG&gt;shortcut keys to launch our apps&lt;/STRONG&gt;.&amp;nbsp; In Windows XP it's very easy.&amp;nbsp; Just find the app in the 'start' menu, go to its properties, make sure you're on the ShortCut tab, then click in the Shortcut field, and press the keystroke combination you want to use to launch that app.&amp;nbsp; Set up shortcuts for VS.NET, your source code control system, and maybe Notepad, Calc, and your XML editor!&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;Here's a dump of shortcuts for VS.NET 2003.&amp;nbsp; They might work in 2002.&amp;nbsp; Don't know, don't care!&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;To build a project from the VS.NET command line: &lt;STRONG&gt;DevEnv xxx.vbproj /BUILD Debug&lt;/STRONG&gt;&lt;BR&gt;&lt;STRONG&gt;Ctrl-K-F&lt;/STRONG&gt; to reformat selected code&lt;BR&gt;&lt;/FONT&gt;&lt;FONT face=Arial size=2&gt;&lt;BR&gt;&lt;STRONG&gt;Ctrl-K-C&lt;/STRONG&gt; to comment selected code&lt;BR&gt;&lt;STRONG&gt;Ctrl-K-U&lt;/STRONG&gt; to uncomment selected code&lt;BR&gt;&lt;/FONT&gt;&lt;FONT face=Arial size=2&gt;&lt;BR&gt;&lt;STRONG&gt;Ctrl-L&lt;/STRONG&gt; to delete the line the cursor is on (from &lt;A href="http://weblogs.asp.net/jkey/"&gt;Jeff Key's&lt;/A&gt; blog)&lt;BR&gt;&lt;/FONT&gt;&lt;FONT face=Arial size=2&gt;&lt;BR&gt;&lt;STRONG&gt;Ctrl-Shift-V&lt;/STRONG&gt; to paste from ring (try this - do two or more copies or cuts to the clipboard, then go to a new location and press Ctrl-Shift-V.&amp;nbsp; Just keep pressing it to cycle through the clipboard ring)&lt;BR&gt;&lt;BR&gt;&lt;STRONG&gt;Ctrl-K-K&lt;/STRONG&gt; to toggle the flag on a line&lt;BR&gt;&lt;STRONG&gt;Ctrl-K-L&lt;/STRONG&gt; to clear all flags in the current file&lt;BR&gt;&lt;BR&gt;&lt;STRONG&gt;F7&lt;/STRONG&gt; to view code&lt;BR&gt;&lt;STRONG&gt;Shift-F7&lt;/STRONG&gt; to view form&lt;BR&gt;&lt;STRONG&gt;RightMouse key-G&lt;/STRONG&gt; jump to definition - Be sure to use the key on the keyboard!&lt;BR&gt;&lt;STRONG&gt;Ctrl-Up / Down&lt;/STRONG&gt; &lt;STRONG&gt;arrow&lt;/STRONG&gt; - scroll window w/o moving cursor&lt;BR&gt;&lt;STRONG&gt;Ctrl-M-M&lt;/STRONG&gt; - collapse current definition to outline / expand from outline&lt;BR&gt;&lt;STRONG&gt;Ctrl-M-O&lt;/STRONG&gt; - collapse all code to definitions&lt;BR&gt;&lt;STRONG&gt;Ctrl-J&lt;/STRONG&gt; - show intellisense.&amp;nbsp; This is handy when you can't remember a control name. So if I'm looking for a checkbox while typing my code, I can type &lt;STRONG&gt;chk&lt;/STRONG&gt; and then &lt;STRONG&gt;Ctrl-J&lt;/STRONG&gt; to see all the checkboxes available in that form.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;There are many other shortcuts out there, but this is a good start.&amp;nbsp; Feel free to email me your favorites and I'll add them to this.&lt;/FONT&gt;&lt;/P&gt;&lt;img src ="http://ericgharrison.com/Blog/aggbug/214.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Eric G. Harrison</dc:creator><title>Are you having problems with VS.NET 2003 being unresponsive when launching it without a solution?</title><link>http://ericgharrison.com/Blog/archive/2004/04/15/187.aspx</link><pubDate>Thu, 15 Apr 2004 09:16:00 GMT</pubDate><guid>http://ericgharrison.com/Blog/archive/2004/04/15/187.aspx</guid><wfw:comment>http://ericgharrison.com/Blog/comments/187.aspx</wfw:comment><comments>http://ericgharrison.com/Blog/archive/2004/04/15/187.aspx#Feedback</comments><slash:comments>7</slash:comments><wfw:commentRss>http://ericgharrison.com/Blog/comments/commentRss/187.aspx</wfw:commentRss><trackback:ping>http://ericgharrison.com/Blog/services/trackbacks/187.aspx</trackback:ping><description>&lt;P&gt;I found this one in the Microsoft support newsgroup Microsoft.Public.vsnet.ide.&amp;nbsp; The problem was that a person was opening up VS.NET and it was taking 80-90 seconds for the IDE to open.&amp;nbsp; However, if he unplugged the network cable, it was loading immediately.&amp;nbsp; It turns out that the problem was that he had opened a project over the network at some point.&amp;nbsp; Now, whenever VS.NET opens, it was looking for that project since it was on the most recently used (MRU) list!&lt;/P&gt;
&lt;P&gt;The solution was to get rid of the network project by trimming the MRU down to the minimum.&amp;nbsp; You can do this by resetting the MRU list down to the minimum (Tools-&amp;gt;Options, General section, Display &amp;#8220;X&amp;#8221; items in most recently used lists) value of 1, exit the IDE, reload it, then set the number back to where you want it.&lt;/P&gt;
&lt;P&gt;Happy coding!&lt;/P&gt;&lt;img src ="http://ericgharrison.com/Blog/aggbug/187.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Eric G. Harrison</dc:creator><title>What's the performance hit of .NET Reflection?</title><link>http://ericgharrison.com/Blog/archive/2004/04/12/184.aspx</link><pubDate>Mon, 12 Apr 2004 06:26:00 GMT</pubDate><guid>http://ericgharrison.com/Blog/archive/2004/04/12/184.aspx</guid><wfw:comment>http://ericgharrison.com/Blog/comments/184.aspx</wfw:comment><comments>http://ericgharrison.com/Blog/archive/2004/04/12/184.aspx#Feedback</comments><slash:comments>5</slash:comments><wfw:commentRss>http://ericgharrison.com/Blog/comments/commentRss/184.aspx</wfw:commentRss><trackback:ping>http://ericgharrison.com/Blog/services/trackbacks/184.aspx</trackback:ping><description>&lt;A href="http://west-wind.com/weblo"&gt;Rick Strahl&lt;/A&gt;&amp;nbsp;has done some tests to determine what the &lt;A href="http://west-wind.com/weblog/posts/351.aspx"&gt;performance hit of using Reflection&lt;/A&gt; in a .NET app can be.&amp;nbsp; The basic gist of it is that yes, it is slower than direct access; However, it isn't really noticable except in tight loops.&amp;nbsp; I would guess that in most line-of-business applications, you would never notice the performance hit by using reflection.&amp;nbsp; I know that in our case, we sure don't!&lt;img src ="http://ericgharrison.com/Blog/aggbug/184.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Eric G. Harrison</dc:creator><title>SQL Server: Select @@Identity trick that caught me!</title><link>http://ericgharrison.com/Blog/archive/2004/03/30/177.aspx</link><pubDate>Tue, 30 Mar 2004 14:16:00 GMT</pubDate><guid>http://ericgharrison.com/Blog/archive/2004/03/30/177.aspx</guid><wfw:comment>http://ericgharrison.com/Blog/comments/177.aspx</wfw:comment><comments>http://ericgharrison.com/Blog/archive/2004/03/30/177.aspx#Feedback</comments><slash:comments>9</slash:comments><wfw:commentRss>http://ericgharrison.com/Blog/comments/commentRss/177.aspx</wfw:commentRss><trackback:ping>http://ericgharrison.com/Blog/services/trackbacks/177.aspx</trackback:ping><description>&lt;P&gt;I've always assumed that you could use SELECT @@Identity at the end of a stored procedure that inserted a row into a table with an identity column to retrieve the identity column that was used.&amp;nbsp; This could then be consumed by the calling application.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;It usually works great, HOWEVER, as I found out today, @@Identity return the last identity value used during the given transaction, not necessarily the one you were expecting.&amp;nbsp; In my problem today, I was inserting a row into a table, which called a trigger to insert a row into another table.&amp;nbsp; The identity value I was getting back was from the second insert into the 'unrelated' table!&amp;nbsp; D'oh!&lt;/P&gt;
&lt;P&gt;The solution is to use SCOPE_IDENTITY() instead of @@Identity, so at the end of your stored procedure, put &amp;#8220;Select SCOPE_IDENTITY()&amp;#8221; and the world will be a happy place again.&lt;/P&gt;
&lt;P&gt;This is the article that I found the solution in : &lt;A href="http://www.databasejournal.com/features/mssql/article.php/3307541"&gt;http://www.databasejournal.com/features/mssql/article.php/3307541&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;img src ="http://ericgharrison.com/Blog/aggbug/177.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Eric G. Harrison</dc:creator><title>MSDN: Rich custom error handling with ASP.NET</title><link>http://ericgharrison.com/Blog/archive/2004/03/29/170.aspx</link><pubDate>Mon, 29 Mar 2004 08:58:00 GMT</pubDate><guid>http://ericgharrison.com/Blog/archive/2004/03/29/170.aspx</guid><wfw:comment>http://ericgharrison.com/Blog/comments/170.aspx</wfw:comment><comments>http://ericgharrison.com/Blog/archive/2004/03/29/170.aspx#Feedback</comments><slash:comments>12</slash:comments><wfw:commentRss>http://ericgharrison.com/Blog/comments/commentRss/170.aspx</wfw:commentRss><trackback:ping>http://ericgharrison.com/Blog/services/trackbacks/170.aspx</trackback:ping><description>&lt;P&gt;Someday I should spend some time with ASP.NET...&lt;/P&gt;
&lt;P&gt;&lt;A href="http://msdn.microsoft.com/asp.net/default.aspx?pull=/library/en-us/dnaspp/html/customerrors.asp"&gt;http://msdn.microsoft.com/asp.net/default.aspx?pull=/library/en-us/dnaspp/html/customerrors.asp&lt;/A&gt;&lt;/P&gt;&lt;img src ="http://ericgharrison.com/Blog/aggbug/170.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Eric G. Harrison</dc:creator><title>Ever had the .NET Framework install fail?</title><link>http://ericgharrison.com/Blog/archive/2004/03/29/168.aspx</link><pubDate>Mon, 29 Mar 2004 08:10:00 GMT</pubDate><guid>http://ericgharrison.com/Blog/archive/2004/03/29/168.aspx</guid><wfw:comment>http://ericgharrison.com/Blog/comments/168.aspx</wfw:comment><comments>http://ericgharrison.com/Blog/archive/2004/03/29/168.aspx#Feedback</comments><slash:comments>16</slash:comments><wfw:commentRss>http://ericgharrison.com/Blog/comments/commentRss/168.aspx</wfw:commentRss><trackback:ping>http://ericgharrison.com/Blog/services/trackbacks/168.aspx</trackback:ping><description>&lt;P&gt;Me neither.&amp;nbsp; But apparently it happens.&amp;nbsp; &lt;A href="http://weblogs.asp.net/junfeng/"&gt;Junfeng Zhang&lt;/A&gt; has a writeup about it.&amp;nbsp; I've posted the entire chunk here since it's small and I want to keep it around just in case his site goes away...&amp;nbsp; Everything below here (in this post only!)&amp;nbsp;was stolen from : &lt;A href="http://weblogs.asp.net/junfeng/archive/2004/01/31/65457.aspx"&gt;http://weblogs.asp.net/junfeng/archive/2004/01/31/65457.aspx&lt;/A&gt;&lt;/P&gt;
&lt;HR&gt;

&lt;P&gt;This trick may have shown up somewhere else. But I still see people asking the same question. So I'll post it in my blog. &lt;/P&gt;
&lt;P&gt;Many people experience failure when installing .Net Framework 1.1 Redist. Usually you see a MSI dialog says &amp;#8220;Internal Error 2908.&amp;#8221;. Later you will see another dialog says &amp;#8220;Error 1935. An error occured during the installation of component xxxx. HRESULT: -2147319761&amp;#8221;.&lt;/P&gt;
&lt;P&gt;The problem usually is because a broken previous install. Rename %windir%\system32\mscoree.dll and re-install usually does the trick. &lt;/P&gt;
&lt;P&gt;This works because MSI uses existence of %windir%\system32\mscoree.dll to tell if a .Net framework is already installed. If MSI believes a .Net framework is already installed, it will use the existing .Net framework to install assemblies into GAC. Renaming mscoree.dll tricks MSI to believe .Net framework is not present. In that case MSI will do a fresh install.&amp;nbsp;Fresh installs rarely fail. &lt;/P&gt;&lt;img src ="http://ericgharrison.com/Blog/aggbug/168.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Eric G. Harrison</dc:creator><title>A way to get a user's group memberships and other info in .NET</title><link>http://ericgharrison.com/Blog/archive/2004/03/26/163.aspx</link><pubDate>Fri, 26 Mar 2004 07:31:00 GMT</pubDate><guid>http://ericgharrison.com/Blog/archive/2004/03/26/163.aspx</guid><wfw:comment>http://ericgharrison.com/Blog/comments/163.aspx</wfw:comment><comments>http://ericgharrison.com/Blog/archive/2004/03/26/163.aspx#Feedback</comments><slash:comments>6</slash:comments><wfw:commentRss>http://ericgharrison.com/Blog/comments/commentRss/163.aspx</wfw:commentRss><trackback:ping>http://ericgharrison.com/Blog/services/trackbacks/163.aspx</trackback:ping><description>&lt;A href="http://dotnetjunkies.com/WebLog/robwalker/archive/2004/01/22/5965.aspx"&gt;http://dotnetjunkies.com/WebLog/robwalker/archive/2004/01/22/5965.aspx&lt;/A&gt;&lt;img src ="http://ericgharrison.com/Blog/aggbug/163.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Eric G. Harrison</dc:creator><title>Global .NET memory counters don't work?</title><link>http://ericgharrison.com/Blog/archive/2004/03/26/159.aspx</link><pubDate>Fri, 26 Mar 2004 07:07:00 GMT</pubDate><guid>http://ericgharrison.com/Blog/archive/2004/03/26/159.aspx</guid><wfw:comment>http://ericgharrison.com/Blog/comments/159.aspx</wfw:comment><comments>http://ericgharrison.com/Blog/archive/2004/03/26/159.aspx#Feedback</comments><slash:comments>9</slash:comments><wfw:commentRss>http://ericgharrison.com/Blog/comments/commentRss/159.aspx</wfw:commentRss><trackback:ping>http://ericgharrison.com/Blog/services/trackbacks/159.aspx</trackback:ping><description>So says Paul Wilson : &lt;A href="http://weblogs.asp.net/pwilson/archive/2004/02/04/67748.aspx"&gt;http://weblogs.asp.net/pwilson/archive/2004/02/04/67748.aspx&lt;/A&gt;&lt;img src ="http://ericgharrison.com/Blog/aggbug/159.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Eric G. Harrison</dc:creator><title>MSDN: Basic Instincts - Deploying Assemblies</title><link>http://ericgharrison.com/Blog/archive/2004/03/26/158.aspx</link><pubDate>Fri, 26 Mar 2004 07:05:00 GMT</pubDate><guid>http://ericgharrison.com/Blog/archive/2004/03/26/158.aspx</guid><wfw:comment>http://ericgharrison.com/Blog/comments/158.aspx</wfw:comment><comments>http://ericgharrison.com/Blog/archive/2004/03/26/158.aspx#Feedback</comments><slash:comments>5</slash:comments><wfw:commentRss>http://ericgharrison.com/Blog/comments/commentRss/158.aspx</wfw:commentRss><trackback:ping>http://ericgharrison.com/Blog/services/trackbacks/158.aspx</trackback:ping><description>&lt;A href="http://msdn.microsoft.com/msdnmag/issues/03/10/BasicInstincts/default.aspx"&gt;http://msdn.microsoft.com/msdnmag/issues/03/10/BasicInstincts/default.aspx&lt;/A&gt;&lt;img src ="http://ericgharrison.com/Blog/aggbug/158.aspx" width = "1" height = "1" /&gt;</description></item></channel></rss>