Application Start Event
-
Thursday, April 08, 2010 5:44 PM
Hi all,
I am creating sharepoint 2010 custom team site defination project in vs2010. I want to keep global values which is access in my sitecolleciton. In asp.net we have to track by global.aspx file. On application start event we fill global variables in asp.net. There is any idea to get application start event & we strore global values in sharepoint 2010 development using vs2010.
Thanks in Advance.
All Replies
-
Friday, April 09, 2010 7:15 AMYou can put a global.asax file with overridden Application_Start event handler in the SP2010.
Cogito, ergo sum. -
Tuesday, April 13, 2010 5:03 PM
Hi Chengyi WU
Thanks for your reply.
Can you explain me how to overridden Application_Start event.
- Marked As Answer by Mark.Choudhary Friday, April 16, 2010 4:54 PM
-
Tuesday, April 13, 2010 6:17 PM
You will find more informations about global.asax here: http://msdn.microsoft.com/en-us/library/2027ewzw.aspx
How to use it here: http://articles.techrepublic.com.com/5100-10878_11-5771721.html
Serge Luca; blog: http://sergeluca.spaces.live.com Devoteam Belgium -
Wednesday, April 14, 2010 3:09 AM
A sample code for global.asax:
---------------------------------SAMPLE CODE------------------------------
public class Global : System.Web.HttpApplication
{
void Application_Start(object sender, EventArgs e)
{
// Code that runs on application startup
}
void Application_End(object sender, EventArgs e)
{
// Code that runs on application shutdown
}
void Application_Error(object sender, EventArgs e)
{
// Code that runs when an unhandled error occurs
}
}---------------------------------SAMPLE CODE------------------------------
Cogito, ergo sum. -
Thursday, April 15, 2010 1:13 PM
Hi Cogito,
Thanks for your reply. This code is very usefull for me.
Thanks again.
- Marked As Answer by Mark.Choudhary Thursday, April 15, 2010 1:14 PM

