Geeks With Blogs

News
About Me:
I am a Female SharePoint Developer (a platinum unicorn). I have been working with SharePoint since I attended the Portal University in 2005. I hold a BA in Computer Science from the University of Missouri - Kansas City. I love playing Rockband, organizing user group meetings, working with code, attending events as a speaker or organizer, and having bizarre conversations about geek things with cool people. If you have any comments or questions fill out the contact form and I will try my best to help.



The Guide of a MOSSLover Becky Isserman's Blog
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 on Thursday, April 17, 2008 5:39 PM | Back to top


Comments on this post: How I Got an Ajax Progress Bar to Work in SharePoint

# re: How I Got an Ajax Progress Bar to Work in SharePoint
Requesting Gravatar...
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
Left by Daan on Apr 28, 2008 4:52 AM

# re: How I Got an Ajax Progress Bar to Work in SharePoint
Requesting Gravatar...
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.
Left by Becky Isserman on Apr 28, 2008 9:16 AM

# re: How I Got an Ajax Progress Bar to Work in SharePoint
Requesting Gravatar...
I am getting an error like this. Please help me.

An error occured during the process of /UserControls/AJAXSampleUC.ascx. The base class includes the field 'UpdatePanel1' but it's type(System.Web.UI.UpdatePanel)is not compatible with the control (System.Web.UI.UpdatePanel).

Moreover, I want to use AJAXControlToolKit.dll which has built-in controls like Accordion,TextBoxWaterMarkExtender,AutoCompleteExtender and so on, in my SPS application.
Left by Ven on Nov 07, 2008 9:34 AM

# re: How I Got an Ajax Progress Bar to Work in SharePoint
Requesting Gravatar...
I am getting an error like this. Please help me.

An error occured during the process of /UserControls/AJAXSampleUC.ascx. The base class includes the field 'UpdatePanel1' but it's type(System.Web.UI.UpdatePanel)is not compatible with the control (System.Web.UI.UpdatePanel).

Moreover, I want to use AJAXControlToolKit.dll which has built-in controls like Accordion,TextBoxWaterMarkExtender,AutoCompleteExtender and so on, in my SPS application.
Please help me
Left by Ven on Nov 07, 2008 9:34 AM

# re: How I Got an Ajax Progress Bar to Work in SharePoint
Requesting Gravatar...
In a basic APSX page, I've implemented an UpdateProgress control using the AlwaysVisibleControlExtender control to make my progress indicator (e.g., "Loading...") appear in a stationary location on the screen regardless of scrolling. And it works like I would expect it to. However, when I place that exact same code into the default.master page, my progress indicator will only appear in the page where I place it (and does not display "on top" and "always visible"). Would you happen to have any idea why I see a difference? My ultimate goal is to have only one progress indicator that fires when an asyncronous postback occurs, regardless of how many web parts I have using AJAX controls. Any suggestions would be appreciated.
Left by Matt on Dec 30, 2008 11:33 AM

# re: How I Got an Ajax Progress Bar to Work in SharePoint
Requesting Gravatar...
i want to implement ajax in web user controls later i want to deply that sharepoint site.....
how it is possible plz help me.....
my project mainly involves web user controls....i.e ascx file to controltemplate and deploy that sharepoint site..
if i want use ajax in that web user controls is it possible? without smart pads
Left by Huradipraveen on Mar 25, 2009 3:07 AM

# re: How I Got an Ajax Progress Bar to Work in SharePoint
Requesting Gravatar...
Can i use AlwaysVisibleControlExtender to maintain i image independent of Page Scroll(Always Visible in the set position). Itseems it will not work in Sharepoint. If anyone has done can u pls Give me Hints..
Thanks
Left by shashilatha on Jan 19, 2010 5:36 PM

Your comment:
 (will show your gravatar)


Copyright © MOSSLover | Powered by: GeeksWithBlogs.net | Join free