Update panel send all the page to the server - asp.net

Good morning everyone, I have a page with a section on the left (an ascx control) with an updatepanel and on the right the remaining part of the page.
The update panel here works pretty well and I am happy for its job.
However in another page I have the same ascx control on the left and tens of pictures on the right.When I use here the dropdown on the left menu (contained in the updatepanel), before to receive serverside the command takes a lot of time and by my opinion is due the browser is uploading all the info (pictures,.. in general the whole page ) again to the server.
Is it possible this my assumption, I haven't found advice on internet and I have a big problem of performance.
Just to highlight one thing the update panel is working , I am correctly updating only the update panel without a full postback, the problem is during the server call that takes time ....
Kind Regards,
luca

Related

ASP.NET 4.0 Ajax Progress Bar Options

I can't believe how many articles I have read and example code I've tried to understand, with no success in accomplishing what I need to do. Hopefully someone can help me out by providing some example code or pointing me to another resource.
I am working in ASP.NET 4.0, C# using VS 2012 Express. The project is a web site. I have a UI page that contains checkbox controls and dropdowns for a user to set preferences. At the bottom of the page is a checkbox for the user to agree to some terms and conditions and an image button they click to get the results based on their preferences. This all works and so does the results page.
The problem is that the results page takes as much as 90 seconds to complete. I can't just leave the user with a "Loading..." on the status bar of their browser. So what I am wanting is:
User clicks to get results
Results page loads immediately
Once results page has loaded, a call is made to server that begins the 90 second process.
User is provided a status display of the progress.
Once process completes, a link is presented for them to view their results.
I see many examples with varied approaches. Most of them require the user to click a button to begin the process. I don't want the user to have to click another button - I just want the process to begin when the results page is finished loading.
Additionally, I'm looking for an idea of how to code the client page to make calls to the server to obtain the status of the process. Preferably a percentage value and a text message for each step of the process. Ie:
25%
Compressing files...
I've seen some Web Method examples, but I don't think I've seen a single one that demonstrates beginning the process initially without having to click a button to invoke it initially. I considered putting the Javascript call in the , but it is contained in a Master.Master that is used by many other pages.
Does anyone know of any code examples that might help me accomplish this sort of thing?
I found a really nice solution from EssentialObjects.com. Their progress bar control is free, although I needed their CallBack custom control to do what I wanted - the CallBack control is not free.
Hope this helps someone else out!

On Updatepanel update, everything outside the updatepanel disappears

Apologies for such a broad, sweeping question, but I can't really give specific code examples because as far as I can tell from research this problem is unique to the particular page I'm working on and if I knew what to do to replicate it then I'd most likely be able to fix it.
I have an asp.net vb (v3.5 using the ajaxcontroltoolkit v4) page essentially binding some straight forward SQL database data to a gridview.
The gridview's in an update panel and whenever I do anything that causes a postback inside the update panel, everything outside the update panel vanishes. The update panel IS updating correclty.
There's no conditional updating, just an 'out of the box' update panel.
All other ajax functionality is working correctly, such as filtered textbox extenders and validation with callout extenders, so I don't think it's a basic script reference error.
I'm making use of javascript and jquery to modify controls on the fly that are within the updatepanel.
It was a standalone page for development but for testing this problem I put it into a contentplaceholder on a masterpage. Now on updating, everything else in the contentplaceholder disappears, leaving the masterpages header etc present.
If you haven't come across this particular problem before, can you think of how I could go about debugging it?
If you have any ideas at all, it might be enough to set me down the right path.
Many thanks.
Thanks for taking the time to make suggestions Mt. Schneiders.
In the end...haha wow, embarrassing... I've been doing this for the best part of 6 years now and I was closing my updatepanel before closing a div that started above the panel.
Simple fix. Yay! Thanks again.

ASP.Net 4.0 , Update Panel.. causing flicker of whole webpage

I have made a web site, a chatting application,... On a webpage independent of Master page, i added a Ajax Update Panel, In the update panel i added a timer , a memo, and a hidden field,..
Its working but causing the whole webpage to flicker, that has made my approach ugly..
Please any programmer help me..
Thanks in advance
Can you post the related code segments? Without that, it is difficult to guess what the problem is.
Page flicker could be:
Page load firing twice in update
Timer firing when not intended
The list goes on...
If you are unable to post the code, I would troubleshoot by removing everything but the core functionality until you can get the flicker to stop then add pieces back in. That is really all I can offer you without the code.

Application performance problem Asp.net

i am facing a big speed problem with my application..we have to go for production but it got push backed becoz of this speed issue..
In my application..i have a page which is the main and important page of whole application..
in this page user spend most of the time...
in this page i am using 6 to 7 javascript files and jquery plugins..
whole page is ajax based and will do the jquery validations...
in this page i have 3 update panels (nested)..one update panel contains one formview and
other will contain one grid and a 4 formviews(will make visible of user selection..4 of the won't come at time..depends on grid view item i will get visible..like grid view record is type one then type one formview will visible on the page)..one update panel is parent update panel..
each formview contains more than 10 controls..dropdowns will load on formview onload event from database loopup tables..
this page won't refresh at all..because ever thing is in update panels..
i can't set the view state to false because of update panels..
i have to make more than 5 database calls each time..
this page works fine at the beginning of application start..after some amount of time its getting slower and slower..the database calls are pretty fast at the beginning and getting very slow after some time...
i don't know how to debug this thing and how to find which one causes this problem....please help me...
Update:
my view state is growing from 35 kb to 160 kb..
and i tried fullpost back triggers for some controls in updatepanels.. but the view state not getting down..its stays like that..on a double or triple browser refresh it got back to 35 kb..is this the issue?? thanks for your replies and suggestions...
I can't really help you if you don't show your code (specifically, the code the runs the database queries that start to slow down), but I can make one (hopefully good) guess:
It sounds like you might not be disposing your database connections properly. Every time you open a connection to the database, make sure you either wrap it in a try/finally block (where .Close() is called in the finally block) or create it with a using block.
You should look into a tool like JetBrains dotTrace that allows your monitor performance on a granular level. Then you will be able to see what the actual cause of your poor performance is. You get a 10 day trial at the website I linked to.
after a very long testing i found the problem...its because of update panels...we should not use update panel for too many controls..I didn't know that and the only control we have in asp.net is update panel for ajax..that's why i used the updatepanels...please stop using updatepanels and try to use jquery..i suffered a lot with this issue...thanks for your support guys...

Is there a way from preventing other ReportViewers on the same webpage from refreshing?

Currently I am working on a web page that has six ReportViewer controls that are using remote processing and that allow for drill-down. When a user clicks on one control the entire page refreshes and the other five reports all refresh as well. Users are currently requesting that the refreshing of the other controls be removed in favor of only the one they click on refreshing. Is there a way of doing this, I've noticed that in Sharepoint that clicking a drill-down report does not require the entire entire page to be reloaded and I'm wondering if I can provide the same functionality.
I have been doing some more research on this issue and it looks like the AsyncRendering property of the ReportViewer control controls the functionality that I'm looking for. When it is set to "false" it prevents the "Report is Being Generated" message from being displayed which is what the users were commenting on. The downside is that the page can take a bit longer to load than before, but as we are working on a development machine this might not be as noticeable once we move to the actual production box.

Resources