Blog Archives

pass null to sql data source select

sds.CancelSelectOnNullParameter = false;

References
http://forums.asp.net/t/963932.aspx

Keep Batch File Open to enter more commands

Typically the solution you will see to this question upon googling is to add “pause” to the end of your batch file.

This will keep the batch open, but it will not allow you to enter additional commands and after hitting a key will close the window immediately.

Alternatively, if you would like to keep the window open, such as creating a shortcut to a command line app, you can use cmd.exe /K.

G:\PathToMyCommandLineExeApp
G:
MyApp.exe /?
cmd.exe /K cmd.exe

Place the above code snippet into batch file of your choosing, such as start menu folder, and upon launch it will not change into the directory and path where your command line app is located, execute it displaying it’s parameters (/? is app specific) and then run cmd.exe with \K option which allows the window to stay open per MSDN (see reference below).

Enjoy.

References
MSDN, http://support.microsoft.com/kb/830473

Common WPF Resource Dictionaries

Skinning a WPF application is as simple as adding an assembly reference (PresentationFramework.Aero) and xml config change. See below.

<Application.Resources>
<Application.Resources>
  <ResourceDictionary>
    <!-- -->
    <ResourceDictionary.MergedDictionaries>
      <ResourceDictionary Source="/PresentationFramework.Aero;component/themes/Aero.NormalColor.xaml"/>
    </ResourceDictionary.MergedDictionaries>
  </ResourceDictionary>
</Application.Resources>
</Application.Resources>

Other sources:

<ResourceDictionary Source="/PresentationFramework.Aero;component/themes/Aero.NormalColor.xaml"/>
<ResourceDictionary Source="/PresentationFramework.Classic;component/themes/Classic.xaml"/>
<ResourceDictionary Source="/PresentationFramework.Royale;component/themes/Royale.NormalColor.xaml"/>
<ResourceDictionary Source="/PresentationFramework.Luna.Homestead;component/themes/Luna.Homestead.xaml"/>
<ResourceDictionary Source="/PresentationFramework.Luna.Metallic;component/themes/Luna.Metallic.xaml"/>
<ResourceDictionary Source="/PresentationFramework.Zune;component/themes/Zune.NormalColor.xaml"/>

References
StackOverflow, http://stackoverflow.com/questions/2075720/windows-7-theme-for-wpf

Get Current URL in Javascript

JS (JQuery):

$(document).ready(function() {
    $(location).attr('href');
});

JS (standard):

function CurrentURL() {
    var currenturl = window.location.pathname;
return currenturl;
}
Follow

Get every new post delivered to your Inbox.