Update Progress & Hiding Updating Content

I have a FormView wrapped in an UpdatePanel which is used to insert new records into the database. When a new record is being inserted, I use an UpdateProgress control to show an animated gif, letting the user know that something is happening. Once the insert is complete, the FormView disappears and a message indicating the record was inserted.

This works fine, but what I'd really like to do is hide the FormView during the insert and only display the gif. Then, once the insert is over, display either the message (if the insert was successful) or the FormView again (if the insert failed). Can anyone suggest a way to do this?

Thank you! 


Kevin Babcock
http://blogs.telerik.com/kevinbabcock
0
aggiekevin
1/29/2008 4:33:13 AM
asp.net.ajax-ui 9760 articles. 0 followers. Follow

3 Replies
990 Views

Similar Articles

[PageSpeed] 6

you will need to add an event to the beginRequest event that goes into the dom and hides the form.

http://www.asp.net/ajax/documentation/live/ClientReference/Sys.WebForms/PageRequestManagerClass/default.aspx

http://www.asp.net/ajax/documentation/live/ClientReference/Sys.WebForms/PageRequestManagerClass/PageRequestManagerBeginRequestEvent.aspx

then on the endRequest event reshow the form or prompt sucess.

 

                Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(BeginRequestHandler);
                Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
                function BeginRequestHandler(sender, args)
                {
                $get("FormView1").style.display='none';
	}
Something like that.
 
Jared Roberts
Lead Application Developer
0
rojay12
1/29/2008 6:14:07 AM

Hold up, there is a much easier way... I was over thinking.

 

    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <asp:FormView ID="FormView1" runat="server" DefaultMode="Insert">
            <InsertItemTemplate>
                <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
            </InsertItemTemplate>
            </asp:FormView>
        <asp:Button runat="server" Text="Button" id="Button1" />
        </ContentTemplate>
    </asp:UpdatePanel>
    <ajaxToolkit:UpdatePanelAnimationExtender ID="UpdatePanelAnimationExtender1" runat="server" TargetControlID="UpdatePanel1">
        <Animations>
            <OnUpdating>                       
            <StyleAction animationtarget="FormView1" Attribute="display" value="none" />                    
            </OnUpdating>                    
            <OnUpdated>                         
            <StyleAction animationtarget="FormView1" Attribute="display" value="block" />                    
            </OnUpdated>
        </Animations>
    </ajaxToolkit:UpdatePanelAnimationExtender>
 

 


Jared Roberts
Lead Application Developer
0
rojay12
1/29/2008 6:21:29 AM

I tried your first suggestion, which worked. But I agree that the second suggestion is a much cleaner and easier way of doing it.

Thanks! 


Kevin Babcock
http://blogs.telerik.com/kevinbabcock
0
aggiekevin
1/30/2008 12:31:52 AM
Reply:

Similar Artilces:

Updates, updates and more updates
Name: pirhan Email: pirhan_chanathotmaildotcom Product: Firefox Summary: Updates, updates and more updates Comments: Hello, Normally I use Safari, but my iBook is out of commission for a while. So, I am forced to use a PC to which I would much rather use Firefox than Internet Exploder. However, as much I enjoy not using a Microsoft product, and use a product that works decently, I am severely annoyed about the constant updates I am put through. In the last two days, I had to wait for Firefox to install updates before I could browse and now, I'm alerted that there'...

updates, updates, updates
Holy Crap, Batman! You'd think I was running Windows XP and it's patch Tuesday. So far this week - new kernel (2.6.27.10), 2 new browsers (Opera 9.63 and Firefox 3.05) and a new plugin (Flash 10.0.156.3). I'm about ready to try one od the BSD's! vince wrote: > Holy Crap, Batman! You'd think I was running Windows XP and it's patch > Tuesday. > > So far this week - new kernel (2.6.27.10), 2 new browsers (Opera 9.63 > and Firefox 3.05) and a new plugin (Flash 10.0.156.3). I'm about ready > to try one od the BSD's! I take ...

updates, updates, updates, NO MORE!
Name: Andreas Email: unbekanntatjokerdotms Product: Firefox Summary: updates, updates, updates, NO MORE! Comments: Hi ! if you want to develop a fine webbrowser, maybe you nee a new management. To release a new buggy version every two weeks is not very professional. Test your software before the release and let the user download a stable browser. this update-orgy since 2.0.0 used me to use Opera instead of FF. We haved use FF in our Company, but we can't deploy a new version every week to +200 Windows-clients, so in our company we've decided to return to IE, ...

Updates Updates Updates
I was a big fan of Firefox.. Now, I don't even like to use it. Seems like every time I start it up I have to update some addin OR the browser itself. And unfortunately the update nag messages are always presented when I start a browsing session. I find this annoying because, typically, when I open a web browser all I want to do is go to a web page. Not update the browser. I can agree that staying current with the latest version could give the best, fastest, safest web experience. But that point becomes mute when I start off every other browsing session with a new update. And mos...

updates, updates, updates
Name: hans jensen Email: hansjensen44_athotmaildotcom Product: Firefox Summary: updates, updates, updates Comments: why is it everytime i go online firefox has new updates, 3 -4 times every day, its never ending..........whats all the problems??? please email me and let me know, ty,.........Hans Jensen Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.2) Gecko/20070219 Firefox/2.0.0.2 ...

Hiding update panel while update in progress
Dear All,  I want to hide update panel while updating is in progress, I want to notice that my update panel is in content page. If any possiblity of displaying modal loading progress dialogue box while updating it is highly useful. example - Like display appear on clicking "Select Tag button" in "write new post" in our forum http://forums.asp.net/ Thanks in Advance        Hi,  Try put this into your updatepanel <asp:UpdateProgress ID="UpdateProgress1" runat="server"> <ProgressTemplate>...

Ajax Update Panel and Update Progress
Hello Everyone,  Its been long time since i have visited this forum, but i have a query regarding the update panel. I have a strange and weard situtaion here, which is only occuring on the web hosting server and it works absolutely fine on VSS (Local) server. The situation is i have an application where Web User Controls are placed on the web page at the design time, they are made Visible true/false at the run time. The Page where controls are placed contains the update panel and the User controls Indvidually too contains the Update Panel. These update Panel are associated with u...

Hide the update panel when update progress is displayed
Hopefully this is simple but cant work out how to hide the update panel when event is fired and the update progress is displayed.  E.g. i have simple code below...and displays fine, but when the updateprogress control displays, it just pushes the updatepanel down...can i get it to display instead of the updatepanel? <asp:UpdateProgress ID="UpdateProgressWizard" runat="server" AssociatedUpdatePanelID="UpdatePanelWizard" > <ProgressTemplate> <div align="center"> <uc3:AJAXLoading ID="AJAXLoading1" runat="server" /> </div> </ProgressTemplate> &...

Updates Updates Updates #3
Name: Product: Firefox Summary: Updates Updates Updates Comments: Seems like every time I open the program there is a wait period while some new arcane update gets installed. I have enjoyed and advocated firefox for a good while, but the update thing is really starting to bug me. Doubtless I could simply change the settings to accept the updates or not notify me or something similar - but I CAN'T BE ASSED. I'd have to consider this for more than 30 seconds and as we've already seen I CAN'T BE ASSED. Please make this less annoying in return for which I promis...

updates,updates, updates,etc.
Name: Product: Firefox Summary: updates,updates, updates,etc. Comments: I am so fed up with all these gd updates I COULD SCREAM! Why can't you get it right and stay with it for a while. Between you guys and MSFT you drive me nuts. Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1 From URL: http://hendrix.mozilla.org/ Note to readers: Hendrix gives no expectation of a response to this feedback but if you wish to provide one you must BCC (not CC) the sender for them to see it. ...

Update Update
Name: John Oswell Email: serviceatwinntecdotcom Product: Firefox Summary: Update Update - endless updates Comments: I think it's great you update the product but I'm starting to think this product is more prone to attack and instability by the number of updates i get inflicted with. Quite honestly on the Windows platform you're going to need to convince me that the Firefox browser is "better" than IE8 - my default browser (ff right now) I'm probably going to revert - endless intrusive updates for Firefox is getting very tiring. At least MS (I'm ...

Updates updates updates #2
Name: Product: Firefox Summary: Updates updates updates Comments: I love Firefox, but it seems EVERY day there is some sort of updates to download before it will open. You need to figure out a way Firefox can open when asked to do so and update in the background and apply the updates on the next restart. Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729) From URL: http://hendrix.mozilla.org/ Note to readers: Hendrix gives no expectation of a response to this feedback but if you wish to provide on...

Update not updating
Name: Willaim Brasuell Email: williamatbrasuelldotcom Product: Firefox Summary: Update not updating Comments: I get a message to update Firefox and start the process. After letting it run for an hour it just keeps saying it's downloading. Having tried four times I think there is a problem here. Regards, Bill Brasuell Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.4 ...

Update not updating
I'm using Web Matrix and the Update code wizard. I have an Access db with a table 'Users'. This contains a Username (primary key) and a password. If I use:- "UPDATE [Users] SET [Password]=@Password WHERE ([Users].[User] = @user)" the update does not work and no errors are reported. If I use:- "UPDATE [Users] SET [Password]=@Password WHERE ([Users].[User] = ""barry"")" the update works!!!. I've spent hours trying to resolve this to no avail. Could this be a bug in oledb and if so does anyone have a work around? Best frustra...

Web resources about - Update Progress & Hiding Updating Content - asp.net.ajax-ui


Emery County Progress - Emery County, Utah
Emery County Progress, Serving Emery County, Utah news since 1900

The Progress
Boro: Paving bid could be good news Friday, June 19, 2015 By Jeff Corcino Staff Writer Clearfield Borough received some potentially good news ...

Progress (spacecraft) - Wikipedia, the free encyclopedia
The Progress ( Russian : Прогресс ) is a Russian expendable freighter spacecraft. The spacecraft is an unmanned resupply spacecraft during its ...

Australia v West Indies: Improved West Indies batting stymies Australia's progress in Boxing Day Test ...
If ever holding a lead of 459 with two days remaining was not a cause for celebration it was on Monday, after the West Indies enjoyed their least-worst ...

Progress Software, Atmel, F5 Buck Terrible Market; AMZN, NFLX, TWTR Fall Hard
... the Dow and the S&P 500, with declines across the major names and across all segments of tech. There are a few bright spots, however: Progress ...

Adoption of cloud computing in the enterprise: The progress in 2015
In general, cloud penetration across the enterprise in terms of workloads being completed continues to be at a relatively low level, with many ...

Facebook wants to own your Saturday night — and it's making progress
... Events tab on Facebook for discovery, organizers and businesses could pay to have event appear at the top. Facebook's made some much progress ...

NITI Aayog still work-in-progress - Business Standard News New Document Widgets Magazine Widgets Magazine ...
It was a year when the Narendra Modi government officially buried the 60-plus years-old Planning Commission and replaced it with a NITI (National ...

Rockets lineup still a work in progress as midseason approaches
The Rockets lineup continues to be ever-changing around the midpoint of the season.

Resources last updated: 1/17/2016 6:05:30 PM