Blog

Dynamically Find Control in Page

Need to find a control in your ASP.net page without knowing where and how deep within containing controls it is buried. Using .Net 3.5 features such as LINQ and Extension Methods its cake! Here is the method:


public static IEnumerable All(this ControlCollection controls)
{
foreach(Control control in controls)
{
foreach(Control grandchild in control.Controls.All())
yield return grandchild;
yield return control;
}
}

SVN for Visual Studio

There is no doubt, when it comes to using SVN (Subversion) within Microsoft development environments, VisualSVN is a must have. Not only does it integrate SVN with the Visual Studio 2005/2008 IDE’s it is clean, clear cut, and easy to use. I have been using it for the last 12 months and have yet to run into any bugs or issues in either 2005 or 2008. The addon is pure SVN heaven and I could not live without it…

Learn More

SVN Server for Windows

Need a SVN (Subversion) server for windows that is free, easy to deploy and has the option for secure SVN over HTTPS? VisualSVN server is all you will need. I have been using this server for the last 12 months and it has never been down and I have never run into an issue using it. It comes bundled in a simple installer with a step by step install wizard that anyone can understand. You can customize the port the server uses, the diretory where your repositories will be created, as well as specify if it will run over HTTP or HTTPS. Oh, and I shouldn’t forget it also allows you to use Windows authentication or SVN’s authentication.

Read More…

Silverlight 4: Formatting Strings Originating from DataBinding

Handling Null values returned by the Bound object.
Using the ‘TargetNullValue=Value’ as an additional parameter in the Binding statement {} you can catch instances where the returned data is null and in its place use the specified value.
Example: <TextBlock x:Name="HandleNullsExample" Text="{Binding Cost, TargetNullValue=None}”>
Formatting Money/Currency
Using the ‘StringFormat=C’ as an additional parameter in the Binding statement {} you can format the returned data as a currency.
Example: <TextBlock x:Name="CurrencyExample" Text="{Binding Cost, StringFormat=C}”>
Formatting Dates
Using ‘StringFormat=MM/dd/yyyy’ as an additional parameter in the Binding statement {} you can format the returned data as a date.
Example: <TextBlock x:Name="BirthDateValueTextBlock" Text="{Binding BirthDate, StringFormat=MM/dd/yyyy}”>
Fallback Values when Binding fails
Using ‘FallbackValue=Value’ as an additional parameter in the Binding statement {} you can pass in a value that will be used when the data binding fails.
Example: <TextBlock x:Name="ManagerOfValueTextBlock" Text="{Binding ManagerOf, FallbackValue=NA}”>

Mix10: Move from Web Site to Web API with OData

We have moved from the original notion of a Web Site to what is now called a Web API.
Open Data Protocol – OData
Netflix just announced they have added a new API to their services using the OData protocol.

VS2010: Has an OData visualizer plugin
OData libraries are available for various platforms. No longer do you need to create proxies to attach to custom services you can simply use the OData library targeting the platform for which you are developing. There is an OData library for the iPhone. SharePoint 2010 is moving all lists to OData Atom feeds. Excel 2010 will now use OData services for Pivot tables and calculations. Microsoft has moved tons of products to implement or consume the OData protocol.
.Net OData library has been released under the Apache license and is available today for all to use. www.odata.org to get implemented libraries for various platforms.

Mix10: VS2010 Supports Multi-Monitor and a Lot More!

Microsoft announces that VS2010 now fully supports

  • multi-monitors from one instance of VS, you can now pull out your code file from VS to one of your other monitors, no longer do you have to switch between markup and code files.
  • Add richer code visualizations
  • multiple web.config files for each of your environments (sooooo very cool)
  • integrated deployments tools for packaging and deploying applications to each of your environments
  • Search for library objects by using Pascal based notation (use TIM to find ThisIsMyOwnObject)
  • Sequence Diagrams showing exactly how your methods are being called
  • Clean URLs called Routing

ASP.net WebForms

  • Now includes new controls such as charts and data
  • all controls output clean markup
  • everything is stylable within the control markup
  • Better, more accurate, and responsive intellisense within markup files

JQuery Script Templates are actual HTML markup with Data-Binding expressions within that markup stored in script tags identified by a template name in the pages markup. These templates are used by JQuery and are populated on the client side on the return of AJAX calls to the server or services. 

  • JQuery is available on Microsoft’s CDN so you don’t have to host them yourself
  • Microsoft will be contributing code
  • Microsoft will be contributing QA resources
  • Microsoft will be contributing plugins
  • JQuery has a 30% market share across the web
  • Dynamic script loading based on dependencies