Feeds:
Posts
Comments

Archive for the ‘Code’ Category

In order to replace a text in any section of the header or the footer of a word document, you can use this snippet

doc = Document Object

foreach (Section sec in doc.Sections)
{
foreach (HeaderFooter fot in sec.Footers)
{
fot.Range.Find.Execute(FindText: loc.Key, ReplaceWith: loc.Value,
Replace: WdReplace.wdReplaceAll);
}
}

Read Full Post »

In order to grant authenticated FBA users access to a custom application page (/_layouts page), please follow these steps:

  • The Page should inherit from LayoutsPageBase (Making it inherit from UnsecuredLayoutsPageBase will grant anonymous access to this page).
  • Override the Properties RightsRequired and RequireDefaultLayoutsRights

       protected override SPBasePermissions RightsRequired
       {
           get
           {
               SPBasePermissions permissionRequired = SPBasePermissions.ViewPages;
               return permissionRequired;
           }
       }

       protected override bool RequireDefaultLayoutsRights
       {
           get
           {
               return false;
           }
       }

 

This will grant authenticated FBA users access to this _Layouts page.

Read Full Post »

http://visualstudiogallery.msdn.microsoft.com/en-us/76293c4d-8c16-4f4a-aee6-21f83a571496

Read Full Post »

YouTube just released an .NET SDK for YouTube.
http://apiblog.youtube.com/2010/02/announcing-youtube-sdk-for-net.html
It includes a VS2008 template to develop YouTube Applications as well as some sample applications

Read Full Post »

.NET stock Trader is a sample application showing a host of .NET technologies using Service oriented and N-tier designs:

A set of videos to demonstrate the application are posted to Channel 9: http://channel9.msdn.com/posts/Charles/Greg-Leake-Stocktrader-A-Loosely-coupled-and-Interoperable-NET-Enterprise-Services-Sample-Applic/

An overview about the application can be found at: http://msdn.microsoft.com/en-us/netframework/bb499684.aspx

A discussion forum for .NET StockTrader is available at: http://social.msdn.microsoft.com/forums/en-US/dotnetstocktradersampleapplication/threads/

Read Full Post »

ASP.NET Add-in for best practices analyzer : http://www.codeplex.com/Wiki/View.aspx?ProjectName=BPAEngine

Tool to show useful information about an assembly when right clicking on it  (Debug or release, Version, public token, etc.) : http://www.codeplex.com/AssemblyInformation

Patterns and Practices guidance explorer: http://www.codeplex.com/guidanceExplorer

Patterns and Practices SharePoint guidance:http://spg.codeplex.com/

Tool to visualize the project dependencies in a solution: http://www.codeplex.com/dependencyvisualizer

Read Full Post »

Regionerate: a small add-in that will help you manage the code order and layout: http://visualstudiogallery.msdn.microsoft.com/en-us/800978aa-2aac-4440-8bdf-6d1a76a5c23c

StyleCop: Tool the check code style and consistency: http://code.msdn.microsoft.com/sourceanalysis

Read Full Post »

Older Posts »