Caveman's Blog

My commitment to learning.

Archive for August, 2009

ASP.Net MapPath

Posted by cavemansblog on August 11, 2009

Writing code in  a web application with not access to HttpContext and still need to map to a folder in the website? No problem.. you can use the System.Web.Hosting.HostingEnvironment.MapPath function.


//This is how you would map if you had access to the HttpContext object

System.Web.HttpContext.Current.Server.MapPath("~/App_Data/data.xml");

//and here is how you would map if you do not have access to the HttpContext object

System.Web.Hosting.HostingEnvironment.MapPath("~/App_Data/data.xml");

Posted in ASP.Net, Sudheer Reddy Battula | Tagged: | Leave a Comment »

Windows keyboard shortcuts that I use very often

Posted by cavemansblog on August 3, 2009

Following are some keyboard shortcuts that use very often.

  • Ctrl + Enter – Auto complete a URL, prepends and appends a website name with “http://” and “.com”.
  • Shift + Enter – Auto completes a URL, prepends and appends a website name with “http://” and “.net”.
  • Ctrl + shift + Enter – Auto completes a URL, prepends and appends a website name with “http://” and “.org”.
  • Ctrl + Esc – Opens the Start menu.
  • Ctrl + Tab – Switch between open tabs in a MDI.
  • Ctrl + Shift + Tab – Switch between open tabs in a MDI in reverse order.
  • Ctrl + Shift + Esc – Opens windows task manager.
  • Ctrl + A – Make a selection.
  • Ctrl + T – Open a new tab in IE, Firefox, Chrome.
  • Ctrl + W – Close a tab in IE, Firefox, Chrome.
  • Ctrl + X – Cut
  • Ctrl + C – Copy
  • Ctrl + V – Paste
  • Ctrl + Z – undo
  • Ctrl + R – Redp
  • Ctrl + B – Bold
  • Ctrl + S – Save the file
  • Ctrl + U – Underline a selection
  • Ctrl + F – Find
  • Ctrl + H – Search and Replace
  • Ctrl + G – Go to line #
  • Ctrl + O – Opens file dialog box
  • Ctrl + P – Opens print manager
  • Ctrl + D – Bookmark a web page in a browser
  • Alt + Tab – Switch between open programs
  • Alt + Shift + Tab – Switch between open programs in reverse order.
  • Alt + Enter – Display properties (file, folder, etc).
  • Alt + F4 – Close a window.
  • Alt + Space – Display system menu of active window.
  • Alt + Home – Launch home page in a browser application.
  • F1 – open help file of the current application.
  • F2 – rename a file.
  • F5 – Refreshes the current window
  • Shift + F10 – Display context menu
  • Windows logo + E – open explorer
  • Windows logo + M – Minimize all windows
  • Ctrl + Alt + End – Security dialog in remote desktop
  • Ctrl + Alt + Break – Toggle full screen in remote desktop
  • Alt + Home – Display start menu

Posted in Sudheer Reddy Battula | Tagged: | Leave a Comment »