So I did not really use multithreading...I went with Ajax instead and I used a button click event. We decided that we wanted to ask the users if they are sure they want to create the site before actually creating the site. It was so much easier in Ajax as you will see in the steps below:
- First off you want to download and install the ASP .Net 2.0 Ajax Extensions 1.0 from here: http://asp.net/ajax/downloads/.
- Next you are going to need to change the web .config a little bit on your IIS Entry for the Site Collection that you want to use Ajax on. Here is a good reference: http://sharepoint.microsoft.com/blogs/mike/Lists/Posts/Post.aspx?ID=3.
- When you have the extensions and you have finished up with your web .config, then you want to go into the Master Page and add a script manager where you see after you see this tag:
<WebPartPages:SPWebPartManager id="m" runat="Server" />
Your code will look something like this when done:
<WebPartPages:SPWebPartManager id="m" runat="Server" />
<asp:ScriptManager runat="server" ID="ScriptManager1"></asp:ScriptManager>
Now you want to refer to open up a Web User Control and drop an UpdatePanel and UpdateProgress Control.
- At this point you want to drop a Label and Button Control on the UpdatePanel, so that users can post back an event and see the progress bar.
- Next you want to drop some type of Image or Label Control. These controls are the ones that will show up while the button click event is occurring. This picture or label or image or whatever you want will load Asynchronously as the button click event is occurring. It's pretty cool, because you see no page loading occurring.
You click the button, it starts site creation and loads the image and label (I chose the gears_an.gif, which is the Official SharePoint Page Load Picture in _layouts/images).
Add the Web User Control to SharePoint using the SMARTPart(http://www.codeplex.com/smartpart) or a Feature.
If anyone has any questions or comments let me know. I'm willing to answer any questions or if you have a challenge I am definitily up for one. I love learning new things and it's most likely random people that come up with the best ideas. I hope this was helpful.