Sunday, November 24, 2013

Install Gui on Windows 2012 R2

Installed the wim on the vhd and booted into Windows 2012 no issues. 
When I logged in noticed that the GUI was not active.  This was a new
one for me since I have just started working with 2012.  Found this
helpful tip.

1. At the prompt type: powershell
2. Install-WindowsFeature Server-Gui-Shell, Server-Gui-Mgmt-Infra
Wait for it to install
3.shutdown -r -t 0

Now when you reboot you will have the GUI!

Source:
http://www.servethehome.com/windows-server-2012-install-turn-gui-powershell-command-line/

Wednesday, November 6, 2013

MVC4 with jquery-ui datepicker - Microsoft JScript runtime error: 'jQuery' is undefined

Working on a MVC project and making good progress.  Decided to start using jQuery and had real
issues using the datepicker.  Kept getting this error and new it had to be something with the order
and load time. 

Solution:
 1. Open your _layout.cs and add the following just before the closing tag of the </body>
    @Scripts.Render("~/bundles/jquery")
    @Scripts.Render("~/bundles/jqueryui")
    @Styles.Render("~/Content/themes/base/css")
    @RenderSection("scripts", required: false)
2. Finally to test your view, open your index.cshtml and add this at the end
<p>Date:
    <input type="text" id="txtDate" class="datefield" />
</p>

@section Scripts{
    @*@Scripts.Render("~/bundles/jqueryval")*@
    <script type="text/javascript">
        $(document).ready(function () {
            $(".datefield").datepicker();
        });
    </script>
}
 
source: