Showing posts with label updated. Show all posts
Showing posts with label updated. Show all posts

Wednesday, March 28, 2012

UpdateProgress Problem

I'd like to show the update progress template in the center of div, which content is updated with update panel. I tried to do it with z-index.. but it works only with absolute positioning so it can be centered only in the whole browser window. What should i do to make it work in the right way? =)

Here is a simple illustration of the feature i need

*****************Update Panel*************
* *

* *

* Loading... *

* *

* *

**********************************************


I have anarticle on creating a modal UpdateProgress. It uses absolute positioning, but you can use relative positioning to position the message within your container. There is ademo available as well... you can use Firebug to mess around a bit with the styles in real-time (just disable the visible=hidden style on the UpdateProgress' main DIV).

Hope this helps.

-Damien


Everything work nice when we use absolute positioning.. but with realtive positioning z-index doesn't work so i failed to put it to foreground.

According tohttp://msdn2.microsoft.com/en-us/library/ms533005.aspx

It is quite possible that relatively positioned elements will overlap with other objects and elements on the page. As with absolute positioning, you can use the z-index attribute to set thez-index of the positioned element relative to other elements that might occupy the same area. By default, a positioned element always has a higher z-coordinate than its parent element so that it will always be on top of its parent element.

I also messed around with the styles on the sample I sent you using FireBug and verified that I was able to set the z-index on a relative positioned element. For example:

#processMessage {

background-color:#FFFFFF;

border:1px solid #000000;

left:43%;

padding:10px;

position:relative;

top:-300px;

width:14%;

z-index:1001;

}

-Damien


You are looking like this one

http://mattberseth.com/blog/2007/06/aspnet_ajax_canceling_an_async_1.html


Thx! Look like it's what i need =)

Monday, March 26, 2012

Updating one Ajax Panel from another

I have two pannels one is a grid and the other is the details pannel. Once you click on the grid the details panel is updated (the grid is a trigger to the detials). What i need is once the user update the details panel, the original grid needs to be update with the new information. If i set a button on the details panel as the trigger for the grid panel, it does not work (recursive triggers?).

How do i do it?

chaim turkel

Hi,

if your panels UpdateMode is conditional, you can always rely on Update method to force updatePanel refresh from your server code.

-yuriy


You have to set UpdateMode="Conditional" & have to be use UpdatePanel.Update() method.

http://ajax.asp.net/docs/tutorials/CreatingPageUpdatePanel.aspx

Wednesday, March 21, 2012

use __doPostBack with Ajax

Hi,

I have a page that is updated frequentlly (it presents stock data) .

I use ajax contrl tool kit controls .

right now there is an ajax Timer control on the update panel, which calls the Update Panel's Update method if needed.

I get my data via wcf client proxy , my question is, is there a way to receive events from wcf on server side?

then hold an updated datatable of stock data?

Thanks

Take a look at this example ofusing __doPostBack to trigger an UpdatePanel refresh.

Additionally, you might be interested in this: http://encosia.com/2007/07/25/display-data-updates-in-real-time-with-ajax/


hello.

well, not sure on what you're asking here...if you want to have a partial refresh caused by your timer, then you should set it up as an asyncpostbacktrigger. if you only want to have a refresh when you receive new data on the server side, then you should do something like this:

1. build a web service that polls the server side to see if there is new data (you can, for instance, have a session variable that will let you know the date of the last update of the data on the server side)

2. when you receive the response you should see if you need to refresh the panel

3. if you do, you should use gt1329a's (sorry man, but i don't know your name :) ) excellent advise and force a refresh of your panel


Hi,

Thanks for your reply, I already implemented what you suggested (sorry for my confused question..)

but im looking for a more efficient solution, to reduce calls to wcf servic.(if its possible)

actually what I meant to ask is , is there a way to hold on server side a DataTable or any other data structure that

will be updated through wcf callbacks (or other type of callbacks from a DLL) , so when a client requests the page i don't need to call the wcf service.

I can bind my data presentation controls to the updated data structure , and server side will handle the updates regardless of client calls .

I think it will be more efficient then calling wcf services from the aspx pages for every request to that page and on each timer tick.

but where can I hold and update that data structure (via wcf callbacks) ?

i want it to be alive with no dependecy on page that are beeing requested.

what do you suggest?

Thanks,

tal


hello.

what you need is some sort of "asp.net singleton". adding a static field to the httpapplication object will be enough for that. here is an extremly interesting article about singletons:

http://www.yoda.arachsys.com/csharp/singleton.html

btw, do notice that this has some problems, specially when you think about web farms, etc...