ASP:Repeater – Finding the index of the current Item

I keep having to look this up, so as a reminder:

<%# Container.ItemIndex %>

… will get the index of the current item in the markup for an ASP:Repeater control.

Advertisements
ASP:Repeater – Finding the index of the current Item

Installing .NET Framework 3.5 on Windows 8.1

God, why is this so difficult? I needed to install the .NET framework 3.5 (for SQL Management Studio, dammit!) on my Windows 8.1 machine. You’re supposed to be able to do this from control panel (Programs and Feature > Turn on Windows Features > .Net 3.5). It didn’t work for me. Continue reading “Installing .NET Framework 3.5 on Windows 8.1”

Installing .NET Framework 3.5 on Windows 8.1

File Path Lengths in Windows

In the Windows API the maximum length for a path is 260 characters.

Slightly edited for length, but that comes from MSDN. Yes, it’s 2014, we’ve dealt with the 8.3 filename limit, found the Higgs Boson, landed a fridge on a comet, but the Windows API still doesn’t play well 260 character length file paths. That’s unfortunate. Continue reading “File Path Lengths in Windows”

File Path Lengths in Windows

SharePoint vs (?) ASP.NET MVC

I’ve been studying ASP.NET MVC 4 over the last while; this is the subject of second of the 4 exams required for the SharePoint Developer MCSD, and I really need to spend some time on that.

The idea of an MVC (Model-View-Controller) framework is to separate the different concerns of your code, and that usually this allows you to design a data model, and then let your tools create a scaffolding of your site. Such things aren’t new; I implemented a Chinese Chess web site in Ruby on Rails which uses this approach in 2005. I loved the MVC approach. Continue reading “SharePoint vs (?) ASP.NET MVC”

SharePoint vs (?) ASP.NET MVC

Clearing the CA0068 Error in Code Analysis

This error was appearing in the code analysis for one of my SharePoint projects. It reads:

Warning 1 CA0068 : Debug information could not be found for target assembly ‘Something.exe’. For best analysis results, include the .pdb file with debug information for ‘Something.exe’ in the same directory as the target assembly.

Annoyingly, it didn’t seem to allow you to suppress it, and I was doing a Release build – so I didn’t expect to have a .pdb file. Continue reading “Clearing the CA0068 Error in Code Analysis”

Clearing the CA0068 Error in Code Analysis

Attaching Visual Studio 2010 to Outlook 2010 plugin for Debugging

I was trying to attach a debugger to an Outlook plugin I was working on. It was originally written for Outlook 2003, but has been progressively upgraded to 2010. However, I couldn’t breakpoint my code, or rather, the breakpoints weren’t being hit.

Found the answer on Stack Overflow:

So it turns out that Outlook doesn’t load the CLR on startup (it must be loaded shortly thereafter when it becomes necessary), which apparently confuses the VS debugger and causes it to only debug native code. To force it to load the CLR immediately, create an OUTLOOK.EXE.config file in the same folder with:

<configuration> <startup> <supportedRuntime version="v2.0.50727"/> </startup></configuration>

which is from this blog post. Then, even when VS starts attached, it will debug CLR code

Attaching Visual Studio 2010 to Outlook 2010 plugin for Debugging