Thursday, April 18, 2013

JQuery for a select all checkbox

So I have a asp.net repeater with a bunch of check boxes.  I want to have a select all/unselect all checckbox at the top of the repeater.

I used this little snippet of jquery to do it.

I got this great script from the bottom of a stack overflow post Here is a small revision on this, when doing this in asp.net with an ajax update panel you need to add the live. This way when the update panel refeshed the html, you can re-connect to your event.

Thursday, April 11, 2013

asp.net Update Panel and hiding elements

When working on a asp.net application that was using multiple update panels I was getting an error something like


Could not find UpdatePanel with ID 'xxx'. If it is being updated dynamically then it must be inside another UpdatePanel

I found the post below on stack overflow.


Basically my issue was that I was hiding the <asp:Panel> that contained the update panel.  This does not work at all.  You cannot do

<asp:panel visible="false" runat="server">
     <asp:UpdatePanel runat="server">
          <ContentTemplate>
                    <div>some stuff</div>
         </ContentTemplate>
    </asp:UpdatePanel>
</asp:panel>

Once I removed the visible="false" from the <asp:Panel> that my <asp:UpdatePanel> and everything worked like a charm.






Tuesday, March 12, 2013

WPF XAML App.config Transformations - Slow Cheeta

I was really tired of commenting and un-commenting out my app.config for my wpf application.  When  deploying I would forget to switch my database connection from dev to test or production.

I am now using Slow Cheeta to transform my app.config by build configuration.  Tying a build configuration to each one of my environments.  It is super easy and works great.

Tuesday, March 5, 2013

Visual Studio Keyboard Shortcut - Highlight Word Ctrl + Shift + Arrow

Sometimes when I am selecting text to cut "Ctrl+x" or paste "Ctrl+v" in visual studio I am selecting a bunch of text. This can take some time by holding the "Shift+right arrow" or "Shift+left arrow".

Recently I found a quicker way "Ctrl + Shift + Right Arrow" or "Ctrl + Shift + Left Arrow" will select a whole word.

Next time you are selecting a bunch of text try it out.  I tried this keyboard shortcut and it even works in Blogger.


Friday, March 1, 2013

Windows 8 - Day 1 Keyboard Shortcuts

So I got a new laptop with Windows 8.  So far its been Ok, but I really miss my start button.

To replace the start button I am using the keyboard shortcut key + Q searches applications.

So when I want to run SQL Server, or visual studio this works great.

I also found this other handy list of keyboard shortcuts

http://windows.microsoft.com/en-us/windows-8/new-keyboard-shortcuts#1TC=t1

Wednesday, February 27, 2013

SSRS - Setting up your development environment

I needed to start working on a few SSRS reports for a current project.  My new development is currently being done using VS2012.  I am still getting use to the interface, for normal web development I find 2012 to be an improvement over VS2010.  The only exception to this is I find the TFS integration to be more difficult to use in VS2012 than in VS2010.  So if I am editing work item templates or working with queries a lot I still  have 2010 running on my laptop most of the time.

I quickly learned that 2012 just like 2010 does not support BIDS.  If you want to build SSRS reports you must step back to VS2008.  So I cracked open VS2008, the oldest version I keep installed on my laptop, and started a new report. I went to check in my report to my TFS 2010 server and found that I do not even have a team menu.  I forgot that VS2008 does not come installed with TFS has a Team Viewer download that must be installed separately so I downloaded it from MSDN.  So I downloaded it and installed it from

Team Viewer Download
http://www.microsoft.com/en-us/download/details.aspx?id=16338

The next step was to connect to TFS.  I opened up the Team Menu and figured out my VS2008 did not have SP1 instaled so I downloaded that also.

VS2008 SP1
http://www.microsoft.com/en-us/download/details.aspx?id=20955

Finally because I was running TFS2010 I needed a compatibility pack downloaded from

TFS 2010 VS2008 Compatability Pack
http://www.microsoft.com/en-us/download/details.aspx?id=10834

I thought I was well on my way.  But I opened up the team menu and tried to connect to my TFS and it would not connect.  After some playing around I figured out you must type in the whole address to your TFS server to make it work.  The UI does not tell you this, but it will not work without doing the whole address

For Example http://tfsserver:8080/tfs

Happy Report Building with VS2008 and TFS2010





SQL Server Reporting Services - Where did my report window go

I was working on a SSRS report recently.  Not an every day occurrence for me.  But its always fun to strap into the way back machine, open Visual Studio 2008, and build a SRSS report or two.

So here I am in my report,  feeling at home in my mid 2000's development environment.  But still feeling lost unable to find the report data window.

I looked under windows and other windows from the menu and could not find it.  So I went to the keyboard and displayed the window using the expert friendly keyboard shortcut. ctrl + alt +d