473,385 Members | 1,372 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

why does updating a div inside of an updatepanel still refreshes entire page?!?!!

hi everyone!
i'm serving up an asp.net page using ajax futures.

long story short:
i have two update panels.
one has a webpage in it (e.g. www.google.com).
the other has an image inside of a div.
however, when i update the div in code behind ( via
UpdatePanel_div.Update() ), the entire page refreshes.
if i change the div to an iframe, then the entire page does not
refresh, only the iframe (like i want).
im not sure what's going on here....is there something special about
div's?
thanks to anyone who has some ideas on this one.
btw...please let me know if you need more info.
thanks,
jojoba

Jul 3 '07 #1
6 8770
When you call UpdatePanel_div.Update( ) from the code-behind, you are
already in the middle of a postback, right? What's the trigger
(control) that caused the postback? Try putting that control inside
an updatePanel also (with children as triggers false and update
conditional). OR try just declaring that control as a "trigger" for
your UpdatePanel_div.

Jul 3 '07 #2
hi and thx for the help!

you said:
<<<<
What's the trigger (control) that caused the postback? Try putting
that control inside an updatePanel also (with children as triggers
false and update conditional). OR try just declaring that control as
a "trigger" for your UpdatePanel_div.
>>>>
The control is a Standard Button.
This button is in the same UpdatePanel (UpdatePanel_remoteWebPage)
that contains a webpage inside (e.g. www.google.com), .
The button is a trigger ONLY for the UpdatePanel_div.
So i have tried your second suggestion to no avail <sad face>.
And i just tried your second suggestion to no avail (putting the
"trigger" button into its own update panel, and setting the trigger
params) <sadder face>
Perhaps this is a bug?
Is the div maybe covering the whole screen or something....and that's
why im getting the full refresh...(i have set the size of the div tho
to be like 100 x 100)

Any other avenues perhaps?
Thx again,
jojoba
Jul 3 '07 #3
Thanks Patrice!

Tried your suggestion to better localize the issue.
I put a label outside of the UpdatePanels.
I set its text in code-behind, right before i update the
UpdatePanel_div, and the text does NOT change in the browser.
This means to me that although the entire page appears to flicker, i
am still only updating the UpdatePanel_div (that's good!)
So then, the question now is, why the heck is the entire page
flickering when we have just shown that ONLY the UpdatePanel_div is
updating?
Thnx to all,
jojoba

Jul 3 '07 #4
still stuck...
please...anyone have any thoughts?
thx so much
matt

Jul 3 '07 #5
Your said you were calling the updatePanel's update() method
explicitly *and* you have a button as a trigger. That's not how I do
it.

I do one of the following:

A) set a control as a trigger for your update panel. Then you don't
need to call "update()" yourself in the codebehind. I think this is
how it works normally, out-of-the-box.

B) Here's what I like best: Create updatePanels anywhere on your
page you want. Make sure they are all "conditional" and make sure you
DO NOT define any triggers. Make sure children as triggers is false.
Then, in the code-behind, call UpdatePanel.Update() method to tell
asp.net to refresh only the proper updatePanel and not the rest of the
page whenever you want. This seems to work really well.

To answer one of your original questions: there is definitely nothing
special about a div that would mess up the updatePanel.

My question: I don't really understant what you mean by "one of the
updatePanels has a webpage in it"? What, technically speaking, does
that mean? Are you using an IFrame? Are you fetching html from a
page and inserting it into a div for it to be rendered?
Jul 3 '07 #6
Hi again
GroupReader said:
>Here's what I like best: Create updatePanels anywhere on your
page you want. Make sure they are all "conditional" and make sure you
DO NOT define any triggers. Make sure children as triggers is false.
Then, in the code-behind, call UpdatePanel.Update() method to tell
asp.net to refresh only the proper updatePanel and not the rest of the
page whenever you want. This seems to work really well.
That's sounds like great advice (why update twice, right?).
I implemented those changes.....Still got that darn update problem
(arg!)
GroupReader said:
My question: I don't really understant what you mean by "one of the
updatePanels has a webpage in it"? What, technically speaking, does
that mean? Are you using an IFrame? Are you fetching html from a
page and inserting it into a div for it to be rendered?
Yep, i am using a dynamically generated iframe:
Frame = HtmlGenericControl('iframe')
Then i point the src attribute to whatever url i want:
Frame.Attributes.Add("src", "http://www.google.com")
That works great.
What stinks is that when i overlay a div on the iframe, and then tell
the UpdatePanel containing the div to update, the whole page flashes.

Kinda confusing....especially since if i change the div to an iframe,
i do not get an flash across the entire page....the update works as
expected

any thoughts.
thx again,
jojoba



Jul 3 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: retroman80s | last post by:
I have an UpdatePanel with a DropDownList. Everytime I select a new item on the DropDownList, the UpdatePanel refreshes and the page jumps to the bottom. I want it to go back to the top of the...
1
by: podpi | last post by:
Hello I'm having a bit of a proooblem. I have a gridview which has a checkbox as one of the templatecolumn's. When it is checked, it hides a textbox containing a DateTime templatefield...
3
by: ma | last post by:
Hello, I have two update Panel in my page. I want to update one of these update panels from another one. How can I do this? How can I force the whole page to be updated from a button inside an...
1
by: =?iso-8859-1?B?R2VhcvNpZA==?= | last post by:
Strange problem... Have a gridview on a page (within an update panel) for displaying event dates. GridView loads fine first time around with the PageLoad. There are 2 text fields a user can...
2
by: DeekoVB5 | last post by:
I can't get an UpdatePanel on my page to work. One control - an ImageButton in a GridView - works the first time you click on it, but then freezes all of the controls on the form. The paging...
1
by: Wazzamatazz | last post by:
Hi folks, I've been trying to work out how to asynchronously update the contents of a TabPanel using an UpdatePanel and I can't for the life of me get it to work. I've seen a couple of examples...
0
by: =?Utf-8?B?c21heQ==?= | last post by:
I'm having trouble with a datagrid in an UpdatePanel that includes a user control in the footer and edit rows. The user control references a js file that initializes an onblur for the textbox it...
18
by: btreddy | last post by:
Hii all, In one my child page i've an updatepanel which contains a gridview .The gridview displays huge amt of data (~3 pages of data) and the updatepanel refreshes for every 1 sec,for tht i've...
18
by: navyjax2 | last post by:
What if your event handler has to be nonstatic?
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.