Showing posts with label postback. Show all posts
Showing posts with label postback. Show all posts

Wednesday, March 28, 2012

UpdateProgress with a Response.Redirect

I have an UpdateProgress control to activate on a postback of a button control. The button_click event is performing a Response.Redirect to pull up a Report from SQL Reporting Server. The report comes up and the UpdateProgress bar is spinning on the page with the button. However, once the user closes the report and control is returned to the page, the UpdateProgress image is still there spinning.

How can I make the UpdateProgress bar to finish and go away?

Thanks,

Paul

Could you please post your code.

Is the UpdateProgress control inside an updatepanel?

JoeWeb


The UpdateProgress is outside of the UpdatePanel.

Protected

Sub ImgButPrint_Click(ByVal senderAsObject,ByVal eAs System.Web.UI.ImageClickEventArgs)Handles ImgButPrint.Click

Response.Redirect(PrintReports.printSchedule("Schedule3", Session.Item("companyId"), Session.Item("year"), 0))EndSub

The UpdateProgress displays a spinning wheel while the response.redirect happens. The Response.Redirect is opening a report from the report server as a .pdf file. So the redirect pops up a dialog asking user either to Open, Save, or Cancel the .pdf report file. Once the user selects their option and control is returned back to the original page the UpdateProgress image is still on the screen.

UpdateProgress: Hide Page During Asynchronous Postbacks

I did a quick search, but I wasn't able to turn anything up. While an asynchronous postback is in progress, I'd like to hide the primary contents of the page and displayonly the contents of UpdateProgress. After the processing has completed, the controls should be made viewable again.

Is this possible?

Thank you,

--
Sean

Just in case anybody else comes across this, I got it to work by writing some custom JavaScript to hide a predetermined div. That way, when the UpdateProgress control is displayed, the screen is otherwise blank.

Monday, March 26, 2012

Updating Controls outside of UpdatePanel on Partial Page Postback

Hi all - I apologize if this has been asked elsewhere. I searched and couldn't find it...

Anyway, I am having an issue where I am doing a partial page postback from a textbox located inside of an UpdatePanel. Based on what the user enters there I need to update a DropDownList located outside of the combo box using the SelectedValue property. When I do it using a normal ASP.NET PostBack without an Ajax UpdatePanel it works fine but when it is called inside of the Handler for the control inside an UpdatePanel it does not work. Is there some setting I need to change to get it to be able to update that control not inside of the UpdatePanel? Thanks for any help.

Don

Hi,

only the controls inside the refreshed UpdatePanel(s) get updated after a partial postback. If you want to update an external control, you should do it using JavaScript on the client side.


HI Garbin, thanks for the post. Actually what I did (and perhaps you were eluding to it) is I placed my DropDownList in its own UpdatePanel with the Update Mode as conditional. Then when my other control fires off and the value of the DropDownList needs to be set, I just set its value and call the Update() method of the UpdatePanel.

Works like a charm.

Thanks!

Don

Updating gridview without postback

Hi!

I want to refresh a gridview without doing postback every second and for do it I use a System.Timer.

I have the grid into an updatepanel and I want to know how can I make, from the elapsed event of the timer, to refresh the grid.

I am trying to use theICallbackEventHandlerbut I can't reach my target.

Could anyone said me if I can do it and how could I do?

I have search code samples but they aren't useful for me.

Try this:

Put a button on the form somewhere, set the onclick event to trigger an update of the gridview. Check that pressing this button updates the gridview as expected.

Make this button invisible by using style='Display:none;'.

On the timer elapsed event add a call to myButton.Click();

Andy.


Finally I have used the Anthem.net library and its panel component. It was very easy working with it doing the refresh without the postback.

There is more information inhttp://www.codeproject.com/Ajax/AnthemNET.asp.

Saturday, March 24, 2012

Upload Image Without PostBack in Asp.Net 1.1

I want to upload image without PostBack in Asp.Net 1.1 not 2.0. Is it possible to upload image without postback?

Technically, no. You can isolate the postback by using an IFRAME, however. Just build a page that handles the image uplaod bit (and not hing else), then refer to said page as the src of an IFRAME in whatever page youw ant to have host the 'upload control'.


Do you have any example code? I don't have any idea. I want to upload image without Postback and then the image will be appear in the Image web contorl. I'm using asp.net 2.0.

Thanks,

Wednesday, March 21, 2012

Urgent: Atlas breaking <asp:button> postback

On my form I have an <asp:ImageButton id='Calculate'> which calls a webservice to perform a calculation then populate a textbox.

I also have an <asp:button id='Save' test='Save'> which performs the form submit.

The Save button works correctly posting back to the server unles the Calculate button is pressed. If the Calculate button is pressed the asynchronous call for the calculation works, but afterwards the Save button will no longer postback.

I created <a href="http://links.10026.com/?link=javascript:__doPostBack('Save','')">Save it</a>. This works before the Calculate is pressed and fails after Calculate is pressed (exactly like the Save button).

Any ideas? I have a client I have to show this to in the morning.

thanks.....mac

hello.

not without seeing a small sample that reproduces the error...