How to add a Global.asax file in Visual Studio 2010

A simple problem I came up agaisn’t today, how to create a Global.asax file.

This global.asax file is an optional file which handles application level events.

I wanted one to set up some variables for my web service (CRM 4) and I wasn’t sure how to add one and I finally worked it out.

Go to the solution explorer -> add new item -> Global application class.

Hey presto you will now have a Global.asax file and a cs file to go with it.

Advertisements

One thought on “How to add a Global.asax file in Visual Studio 2010

  1. fawad surosh January 9, 2013 / 3:45 pm

    You don’t need to create a new glabal library class since when you create new web application or website, your application itself will already have an item named global.asax.cs in your solution explorer.

    Fawad surosh

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s