Update Panel posts back after a period of inactivity - asp.net

I have a asp.net user control in a SharePoint solution. This user control uses Telerik Asp.net Ajax controls to provide a basic datagrid CRUD operations. I use this grid in a web part on a page in SharePoint 2013.
I have a datagrid which is wrapped with RadAjaxPanel to ajaxify it.
It all works fine. However, let's say, I click the add new record button and it opens a form to fill, if I leave that form intact for a minute, then start to fill and submit, it does postback and cancels form.
However, if I click on add new record and fill the form and submit, it all works fine. I guess there is a timeout somewhere which causes this, my two days of research did not help me to find it.
I was just wondering whether you have ever come across with this issue. I guess it does not matter whether it is Asp.net update panel or RadAjaxUpdatePanel, even if you have seen this issue on Asp.net update panel, that will help too.
I did not know what part of the code I should share, please let me know if you need any code to understand this issue.
There must be something on SharePoint script manager, and ajax manager, but I have no idea what.

It looks like it is a known bug in SharePoint 2013. People suggested to install December 2014 CU to solve it, but it did not solve it. Someone mentioned in this link to make request to server via javascript event given interval. As my page does postback if I leave it about 20-30 sec idle, I call a random SP web service evet 15 sec which seems to resolve my issue. Please see below link which helped me to workaround this.

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!

Page hangs when leaving it for a while using ASP.NET Ajax

I'm working on a business application using ASP.NET Ajax , NHibernate and Spring.Net, I've got an annoying problem. The problem is that when I leave page for about 5 minutes and then return back and try to make any action that posts back, it displays wrongly (if there are controls hidden by style it became visible). In addition, the page didn't post back to the server.
Also the problem happens when opening two different tabs, different pages (Each page uses session but different keys )
Thanks in advance
As you describe the problem, its sounds that connect the content of the page with the user cookie and session, and when the session expired the application did not take care to recreate it.
So the post back fail because the session data have been lost when the page ask for them / need them to work and display correct the results.
This is the issue that I diagnose, how you fix that is up to you :)
Possible solutions
Change the logic of the page creation.
While the user is on page do not let the session ends (not good practice)
Store the user data of the page, on a database - connected with the user, and delete it after some days if not have been updated.

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.

updating data in a grid or something like that when someone inputs new data !(WITHOUT ANY POSTBACKS)

imagine that i have a web page in my application for inputing data and there is a grid at the bottom of them (showing inputing data)...
i want to force this web page acts like a windows application (mean i do not want any postback after enter and that grid should be updated after inputing data without postback)...
imagine that i opened this page in my pc and my friend has opened this page too / i want when i input data in ajax mode , that grid updated for my friend without any postback / like windows application ...
is timer a good idea for doing this ?
or is there a better way for doing that?
thanks in advance
best regards
You're definitely going to have to go AJAX for this - the simplest (but definitely not the most efficient) method would be to add the AJAX Control Toolkit to your project, wrap your GridView in an UpdatePanel, and have a timer on the page to check the database to see if there's anything newer than last time you checked. If there has been a change, you can either re-databind the grid or just render that new content manually (and update the UpdatePanel).

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...

Resources