Interested in Sitecore?

Apply for our Mentorship Program by emailing your resume to chris.williams@techguilds.com. Check out our ASP.NET QuickStart and C# QuckStart Libraries. Below is my latest articles.

Thursday, December 11, 2008

Detecting an Ajax Async PostBack on page_load

I had to search a few times to find this. People were giving very unique answers but this one is the correct one:

if(!ScriptManager.GetCurrent(this).IsInAsyncPostBack)
{
//code when it is a sync postback
}
else
{
//code when it is an async postback
}

If you have any tips, tricks, resources you would like to share with the guild please email them to Susan Fischer at susan@clinchportal.com and we will post them.

Tuesday, November 25, 2008

Finding what version of dlls an exe is referencing

If you are getting an error about a version of a dll not matching when you run the exe then you need to get the right version of the dll. The way to find the dll version is to use an application like:


http://www.red-gate.com/products/reflector/

If you come across any tips, tricks, tools, resources that you think the guild will find useful please email me at susan@clinchportal.com

Thursday, November 6, 2008

Object Dumper: An invaluable library when learning Linq or simply to figure out what an object is doing.

I came across this interesting library as part of the LINQ samples. Its called the Object Dumper. Basically it uses reflection on your object and dumps the results to the console for you.

The object dumper is a small utility library that comes with the LINQ CTP
samples. It basically iterates through the properties using reflection and dumps
the values to the console window. You can find the source at C:\Program
Files\LINQ Preview\Samples\ObjectDumper in the C# download.Jim
Wooley http://devauthority.com/blogs/jwooley/default.aspx


This is invaluable when you have a chunk of code you are developing and currently don't have a ui. You are simply developing the data layer and business rules layer. This object will spit out the results for you. Afterwards you could run a winmerge or other compare tool on the object at start and stop and see what changed. This is extremely valuable if your object trees are really large.

If you come across any tips, tricks, tools, code snippets that you find useful please email them to me at susan@clinchportal.com and I will post them for the group.

Friday, October 24, 2008

Mole - debug visualizer for visual studio

Take a peek at this replacement debug visualizer for visual studio... the new version allows updating values during debug. I've been using it for a few days and it's got great drill down for collections and datasets.

http://www.codeproject.com/KB/macros/MoleForVisualStudioEdit.aspx#Update

If you have any tips, tricks, resources, etc that you think other C# Guild Members would benefit from please email them to susan@clinchportal.com and I will update this blog.

Thursday, October 9, 2008

How To Create a Guid in C#?

I noticed people searching for how to create a guid in C#. The quick answer is

System.Guid.NewGuid();

If you would like more information on what a guid is. The following article will help you out:

http://www.csharpfriends.com/Articles/getArticle.aspx?articleID=335

If you have any tips, tricks, resources you may find useful to the group please email Susan Fischer at susan@clinchportal.com

top 10 c# sites

As Requested here are the Top 10 C# Sites


  1. Scott Gu's blog - Why not get it right from the guy developing it?

  2. 4 guys from rolla

  3. ASP Alliance

  4. msdn

  5. devx

  6. MSDN Blog

  7. code project

  8. Geeks with blogs

  9. Ode To Code

  10. asp.net and asp.net forums



Bonus Entries: Because everyone knows there are more than ten

Friday, July 25, 2008

Linq's Lack of Consistancy

I have been playing with the various flavors of Linq: Linq for Objects, Linq for SQL, Linq for XML. The one thing I found troublesome was the vast difference in the syntax and functionality between them. We need someone to write a library above linq to get rid of some of these. For example: Linq to DataSet allows you to do use an extension method to grab it as a datatable or dataview. I would love to do the same regardless of whether I am using XML as my data source or SQL Server. The point of Linq is to reduce the amount of code needed. If we reduce some of the differences then we can share even more of the code and further reduce the lines we need.

If anyone has any extension method classes or a framework over linq that will do this let me know and I will post it here for other to use.

Sunday, May 25, 2008

Regular Expressions - Help!!!

If you are like me you find dealing with regular expressions both powerful and frustrating.I found a couple links that may help you on your journey to build regular expressions.

Roy Osherove has a few tools here that will be useful. The first is the Regulator that allows you to build regular expression with intellisense included. The second tool is the regulazy that allows you to typein text select it and via right click create your regular expression:

http://tools.osherove.com/Default.aspx?tabid=165

The third is not really a tool but a library that helps you find regular expressions that others have created for you:

http://regexlib.com/

This posting is also available at: http://clinch-aspnet.blogspot.com/2008/05/regular-expressions-help.html You can check out this blog for additional information related to asp.net

If you find any regular expression tools or other tools you find useful please email them to me at susan@clinchportal.com

Thursday, May 15, 2008

Intermittent Invalid Viewstate Error in ASP.NET Web Pages

If you are getting Intermittent Invalid Viewstate Error in ASP.NET Web pages possibly this article will help you

http://support.microsoft.com/kb/555353

If not and you find one that does simply email Susan Fischer at susan@clinchportal.com and she or I can post them here.

Friday, May 2, 2008

Perpetual Beginner

For those just learning some of the newer technologies such as subsonic, linq, mvc, etc this is going to be fast becoming the place to go. It is definitely a blog to keep an eye on. The Perpetual Beginner, Jesse Naiman, will soon be a name you will remember.

Here is the link to his Perpetual Beginner blog at : http://alt-net-guild.blogspot.com/

Free Source Control Repository That Integrates With Visual Studio

My friend Jesse Naiman sent me a recommendation for free source control for a project I am working on. I thought about writing a recommendation myself but he words it perfectly. Here is his recommendation:

This site is awesome http://www.assembla.com/

You
can setup a free SVN repository (up to 500MB), and you get an amazing amount
project management tools.

A couple helpful hints on SVN in case
you haven’t used it.

Install tortoisesvn which will allow you to
manage source control through windows explorer.
Install AnkhSVN
to get svn integrated into visual studio.

Tuesday, April 22, 2008

What is Pheonix?

I have noticed people searching for Phoenix.

Phoenix is a framework for building compilers and a wide range of tools for
program analysis, optimization, and testing. Phoenix is designed to support
advanced techniques in compilation and program analysis. It provides a wide
variety of building blocks, implemented around a common intermediate
representation. Phoenix applies equally well to basic block analysis; memory
tracing; code coverage; fault injection; run-time profiling and feedback;
ahead-of-time and just-in-time compilers; and whole-program, post-link, and
runtime optimization.

I did some poking around and found a couple links for you:

http://research.microsoft.com/phoenix/
http://blogs.msdn.com/srisub/archive/2006/10/19/Phoenix-as-an-instruction-tool.aspx

Monday, April 14, 2008

WebControls: Overriding RenderContent vs Render

Many examples of creating WebControls will override Render while others override RenderContent. This confused me for the longest time as I didn't really see the difference.
It was only when I was introduced to adapters that I realize why you use one over the other.

If you override RenderContent, then the wrapper tag is created for you. By default its a span but you can use adapters to change it. If instead you override Render, you are responsible for the outer tag and must take into account yourself adapters or force the control user to use your tag.

http://alvinzc.blogspot.com/2006/10/aspnet-basic-of-custom-server-control.html

If you have any tips, tricks, questions about C#, .NET or the like please email them to susan@clinchportal.com

Thursday, February 14, 2008

WinMerge as Compare Tool In Team Foundation Server

Some of you are probably frustrated with the compare tool in TFS well if you like WinMerge then here is a link to help you use it as an alternative:

http://neovolve.com/archive/2007/06/19/using-winmerge-with-tfs.aspx

Visual Studio Goes Off In Limbo

AutoRecover is a feature in VS 2005, which used for automatically saving work on a regular basis. This will be helpful when power failure or system crash. Anyway, we could turn off it in VS 2005 optionsEnviornmentAutoRecover http://msdn2.microsoft.com/en-us/vstudio/aa718517.aspx [AutoRecover in the IDE] If you go into Tools/Options and click on the environment tab you may see an option for AutoRecover.If not there is a checkbox at the bottom that says show all options then it will show up.When you click on AutoRecover you will notice that it tries to save your work every 5 minutes.

Friday, February 1, 2008

Trouble installing Visual Studio or .net Framework

I was having trouble installing Visual Studio 2008 after installing earlier betas of it.
Unfortunately the uninstall in add/remove programs was broken. I came across this tool and used it to remove the older frameworks. I thought I would pass it on:

http://blogs.msdn.com/astebner/archive/2005/04/08/406671.aspx

Wednesday, January 23, 2008

Setting User Control Properties in Repeaters

The way microsoft parses this is kind of silly but you need to ensure that you use a single quote to wrap your property values. You CANNOT place any text between the ' and < % or it will fail.

'< % # String.Format( "xsl/nav/{0}_config.xml" , DataBinder.Eval(Container.DataItem, "MenuItem_Name" )) % >'