News

Rebecca Isserman's Facebook profile

My Stats

  • Posts - 92
  • Comments - 104
  • Trackbacks - 0

Twitter












Tag Cloud


Recent Comments


Recent Posts


Archives


Post Categories


Blogs on SharePoint


Other Blogs


Resources on Sharepoint


Stuff



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:
  1. First off you want to download and install the ASP .Net 2.0 Ajax Extensions 1.0 from here: http://asp.net/ajax/downloads/.
  2. 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.
  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" />
  4. 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

  1. 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.
  2. 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.

Technorati Tags: ,,

posted @ Thursday, April 17, 2008 5:39 PM | Filed Under [ MOSS .Net ]

Comments

Gravatar # re: How I Got an Ajax Progress Bar to Work in SharePoint
Posted by Daan on 4/28/2008 4:52 AM
Hey Beckie,

Thanks for your post, it was very usefull. I made an webpart that on a mouse click will show the loadpicture until the event is finished. My question is: I want during the event that the button control is disbled and afterwards it is enabled again(so users can only click once during the event) Do you have an suggestion how to create that?
greets,

Daan
Gravatar # re: How I Got an Ajax Progress Bar to Work in SharePoint
Posted by Becky Isserman on 4/28/2008 9:16 AM
I would suggest hiding it in CSS and making it visible again with CSS on the click event. I am working on hiding the controls. I can post that code when I get a chance.
Post a comment





 

Please add 7 and 3 and type the answer here: