.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links


Posted By:      Posted Date: October 27, 2010    Points: 0   Category :ASP.Net

Hi guys it's been a long time since my last "q" or "a".

Anyway, I currently have a ajax based progressbar, which works like this: my long-task stores progress in session. Async callback retrieves progress from session, progressbar is updated. Everybody is happy... not!

This only works when the "main loop" of the time-consuming task runs in either codebehind or a class with httpcontext. But all my businnes objects cannot do such thing.

So, the next natural spet would be to say "move it to a static class" ProgressHelper or something, but since static classes are shared across all appDomain, I would bump into concurrence problems.

So, can i have say a "static list progress" say progress["session1_progress"], progress["session2_progress"], progress["sessionN_progress"] ?

I cannot really see a way to update progress from inside a task in a business object, which i might want to use also in other plattforms like a desktop app?

Thanks in advance!


View Complete Post

More Related Resource Links

Real time progress bar with dynamic task state


I'm trying to create custom control which displays real-time state (progress bar, or percent value) during time-consuming task (no animated GIF, or static text message).

This scenarion can't be done with standard UpdateProgress control, because it displays only static progress information.

This custom control can be then used as follows:

  1. Aspx page should contain this custom progress control and a button.
  2. When user clicks button, page executes postback to the server.
  3. Server in button click handler starts performing some time-consuming task.
  4. Client installs timer with interval is set to 2000 ms.
  5. In client timer event handler should be request to the server for progress refresh.
  6. If server receives request from progress control, it checks actual task progress state, and performs client control refresh.
  7. When server terminates executing the task, it hides progress control on the client.

How can be this scenarion accomplished? How can I create such custom control?

thanks in advance

Truly Understanding View State

This article provides a detailed understanding of the ViewState.

Design Patterns - Using the State Pattern in C#

What is the State Pattern?

The State Pattern is a behavioral pattern that can be used to alter the behavior of an object at run time. As the state of an object changes, the functionality of the object can change drastically. This change of behavior is hidden from the Client and the Client interfaces with a wrapper object known as the Context. The State Pattern is a dynamic version of the Strategy Pattern.

view state vs request parameters


If  the view state is the data entered into the form fields then they are supposed to be available in the request parameters or request body. Then why would we need view state for?


SQL Server Session state problem.


Hi to all,

I have some things that I want to know. I am right now using a free asp.net webhosting ("somee.com"). The problem is that when I am visiting a page, there's a tendency that values stored in my session variables are lost. Therefore, it causes an error when the requested page is loaded.

1. I am thinking of using sessionState mode="SqlServer". Will it solve my problem?

Actualy Im working on it but Im having problems when connecting to the sql database.

2.  Is that a problem in the webhost?

3. Do free webhosting sites provide allow session state in the sql server?. Because ive tried it locally into my computer and error say's i should intall the ASP.NET Session State SQL Server version 2.0 or above.

View State Encryption


Hi All,

Why is it that I see the same hash value generated when I use different algorithms for viewstate encryption. I have added below lines to the web.config file

<pages viewstateEncryptionMode="Always"

browser gives jibberish when State manager (sql) is turned on


Hi all, we're testing our web app with a state manager so that we can do distributed rollouts. We're not getting any errors, but we are getting jibberish returned for every page request. 

(it won't even let me paste it in here)

HOw do I get it to serve the pages normally?


Custom Server Control Property not maintaining state


I have created a server control consisting of a TextArea and a div under it.  My goal is to create my own asp:TextArea type control.  the div is for a Character count of the text area and seems to work ok but i added a CharacterCountVisible property to the control that is always returning true.  See Proptery definition below


<Bindable(False), Category("Appearance"), DefaultValue("True"), Localizable(True)> Property CharacterCountVisible() As Boolean
        Return _CountBoxVisible
    End Get
    Set(ByVal value As Boolean)
        _CountBoxVisible = value
    End Set
End Property

Note the _CountBoxVisible variable is define inside the class as :

Dim _CountBoxVisible as Boolean = True

What I am trying to do is give the user/coder the option to show/utilize the char count feature.  Can make it disappear with textarea1.CharacterCountVisible = False but setting it to true will not make it display.


What am i missing





Security Briefs: View State Security


Effectively managing user state in web applications can be a tricky balancing act of performance, scalability, maintainability and security. The security consideration is especially evident when you're managing user state stored on the client. Here's what you need to know about view state security.

Bryan Sullivan

MSDN Magazine July 2010

CLR Inside Out: Handling Corrupted State Exceptions


There's a danger in using one-size-fits-all exception handling, and you need to know how to avoid it by being as specific as possible about how you handle errors.

Andrew Pardoe

MSDN Magazine February 2009

Foundations: Managing State With Durable Services


This month Juval Lowy tackles questions such as when to keep proxies and services in memory for better state management in long-running workflows.

Juval Lowy

MSDN Magazine October 2008

WCF P2P: How To Design State Sharing in a Peer Network


Learn how you can peer-enable business applications by allowing them to share state in a serverless peer network.

Kevin Hoffman

MSDN Magazine July 2008

WF How-To: Building State Machines with Windows Workflow Foundation


State Machine workflows represent a different way of visualizing program logic. Rather than flowing from activity to activity like sequential workflows, State Machines transition from state to state. Learn about uses for State machines and see how to design and build a State Machine workflow with Windows Workflow Foundation.

Keith Pijanowski

MSDN Magazine February 2008

Bugslayer: Measuring the Impact of View State


Bloated view state can be a real performance bottleneck for your Web app, but it can be difficult to diagnose. John Robbins creates a handy tool that records and reports the view state size for pages in your ASP.NET applications.

John Robbins

MSDN Magazine November 2007

.NET Matters: Deserialization Progress, and More


Build a standard progress bar that indicates how much deserialization has completed and how much still remains. Plus, System.Collection.Generics performance.

Stephen Toub

MSDN Magazine December 2006

Cutting Edge: Simplify Task Progress with ASP.NET "Atlas"


Dino Esposito rewrites his task progress bar with the help of ASP.NET "Atlas."

Dino Esposito

MSDN Magazine October 2006

Cutting Edge: Reporting Task Progress With ASP.NET 2.0


The progress bar is great for keeping users informed about the progress of a task. Unfortunately, there's no progress bar element built into ASP.NET, so Dino Esposito solves that problem with his ProgressPanel control.

Dino Esposito

MSDN Magazine September 2006

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend