State Management :: How To Save Intermediate Data

Jun 10, 2010

I have a scenario where intially I make 1 trip to database and get all the data required

At first page load I display only some of the data (it is more like Collapse and Expand feature on Reports)

Now as and when required users Expands and Collapse Rows

Depending on the requirements I query the orignal data set and display the records

What is the best method to store these larger chunk of data aw well as the in between state of the displayed table

Till this point I was storing the dataset in session variables

One way I thought was retreiving the data from Database and then store it in XML file along with UserId and current time

Then for the modified table another file which gets updated as and when the request change

I am not sure if Caching is going to work since every user will request different data

View 9 Replies


Similar Messages:

State Management :: Save Session Data To Oracle 10g R 2 In Application?

Feb 26, 2011

I am creating a web application that will be running on an infrastructure which will utilise a number of web servers, web gardens and a load balancer.

As the application is using Sessions, and that our application is using Oracle as the database, we would like to use the database to save the Session data. However, I am struggling to find any good examples on how to do this with Oracle.

I note that Oracle provides the following class: Oracle.Web.SessionState.OracleSessionStateStore, but I am unsure what I need to do in the Code Behind and what if any tables do I need to create in the database.

View 2 Replies

State Management :: How To Save Querystringparameter To Session State

Oct 19, 2010

if I can save the querystringparameter to session state, I want to use the parameter in code behind. Or is there a better way to do it?

View 2 Replies

State Management :: Save An ImageButton To The Viewstate?

Sep 8, 2010

I have created a custom control that extends the class ImageButton, the thing is that I now also want to save this control to a viewstate.

View 4 Replies

State Management :: How To Save Int Array In Viewstate

Oct 25, 2010

how save int array in viewstate?

View 4 Replies

State Management :: Config Example To Save Cookies

Apr 19, 2010

Can someone show me what I need to do to allow cookies:
I have this code after I "authenticate" the user (my own Login Control, & code to authenticate).
If the user checks the "Remember Me" checkbox I am trying to set a cookie with this:

// add 1 month
DateTime expireDate = currentDate.AddMonths(1);
// set the cookie
HttpCookie cookie = new
HttpCookie("LithoUserName");

cookie.Value = customer.UserName;
cookie.Expires = expireDate;
cookie.Domain = "lithoman.com";

Response.Cookies.Add(cookie);

When I go to retrieve the cookie the value is not there. It worked once, then I closed the browser and it disappeared (the cookie was no longer there).I went to GMail & there cookie worked so I am pretty sure the problem is my web.config, but most of the examples for Forms Authentication want you to "authenticate" with Forms Authentication, all I need is for cookies to work. I was able to do this real easy 12 years ago in Class Asp using Visual Interdev, & thought that product sucked compared to Visual Studio 2008 today, but if progress makes a cookie not work then something is wrong. This is not a bank site, or a matter of a life or death, it is just a time saver to sign someone in.

View 1 Replies

State Management :: How To Save An Object Reference In A Viewstate

Nov 17, 2010

When I try to save an object reference in a view state it tries to save the object content using serialisation. to save the object reference only to apply to this object instance after postback?

View 5 Replies

State Management :: How To Save CheckBoxList Values Into The Viewstate

Dec 16, 2010

how to save the CheckBoxList values into the viewstate

for e.g.i've a CheckBoxList with 4 ListItems,

if I check 1 & 3 items, then I close the page

if I re-open the page, items 1 & 3 must be checked.

View 5 Replies

State Management :: How To Save Username In Session Variable

Apr 20, 2010

I am building a simple search interface for one of our existing systems. I am using windows authentication. What I would like to do is grab the username of the logged in user via httpcontext.current.user into a session variable on page load and use it in various places on my page. My problem is that when i run my code in debug mode from visual studio it works fine. But when i try to run my code from the browser using localhost it does not work.

View 4 Replies

State Management :: Save A Value To A Variable From Database Permanently?

Dec 20, 2010

Suppose there are three button and every butthon has a click event function.

Clicking the first button displays something on this page with a gridview taking data from databases.

After clicking the first button i stored the value in a variable.

But when i click the second or third button i get null value for that variable.

Clicking the second or third button the page reloads and the value of that variable becomes null.

How can i store the value to that variable permanently?

View 9 Replies

State Management :: Error :Session State Has Created A Session Id, But Cannot Save It?

Nov 18, 2010

I read the solutioin for this error, at the following link :http://forums.asp.net/p/1046935/1576341.aspxbut I am still not clear what exactly causes the error. I have two doubts :1. Can anyone please elaborate a bit on this issue, with any example ????2. Is there any drawback of this approach ?

View 4 Replies

State Management :: Save An Object In Session With Expiry Time?

Jan 30, 2011

The a way to save an object in session with expiry time , such as when you're saving object in cache.

View 12 Replies

State Management :: Save Cookie When Users Marks The Remember Me Box But Its Not Working?

Apr 1, 2011

[Code]....

i'm using this to save a cookie when users marks the remember me box but its not working.

View 7 Replies

State Management :: Save Session Variables Through Browser Refresh / Reload?

Mar 30, 2010

Is there a good way to keep the session after a user clicked reload/refresh? My boss wants this functionality, and I don't really/really don't want to use a query string...

View 2 Replies

State Management :: Save The Viewstate At The Server Side Instead Of __VIEWSTATE Hidden Field?

Feb 10, 2011

i am facing the following problem while saving the viewstate on the server side using the savepagestatetopersistencemedium, but this is not working for the pages which contains update panel.

View 2 Replies

State Management :: Storing Large Data In Session State?

Sep 18, 2010

We have a scenario where we need to store large tables of data on Session in asp.net page. on a highlevel we have to store following data

1> A table (table 1) with 1000 rows and 8 to 10 columns.

2> A table(table 2) with 500 rows and 8 to 10 columns (actually user can add the data from table 1 to table 2, so as user keeps on adding from table 1 we remove the data and put it in table 2)

3> Another table(table 3) with 1000-1200 rows each having 3 columns.

We are having a webfarm, so we need to store it in either SateServer of Oracle DB,What would be the performance implications of storing such huge data on the server.

One more thing is at any point of time max of 70 -80 people will be accessing our website, so will this cause any performance degradation?

View 7 Replies

State Management :: Client And Server Side State Management?

Feb 25, 2011

when we go for client and server side state management in asp.net

View 2 Replies

State Management :: State Management Using Shared Class?

May 29, 2010

I am doing a POC of making my website run faster. Currently it stores huge object data in Session while passing information from one page to another. What I was thinking is to use shared methods and properties instead of session. It works, but wanted tocheck if this is an optimum way to do it. Below is the code that does not use session but still pass object data from one page to another:

[code]...

View 1 Replies

State Management :: State Management And Page Navigation?

Nov 18, 2010

i have a form on page1.aspx with several controls (textbox, dropdownlist, etc).on Page1 PageLoad event i load data from database and performe databinding.From Page1 a user can, by clicking a specific button, move to Page2.aspx to insert some details and, after saving details, he returns to page1.

if save changes are made on control on page1 before save them to db, obviously, these are lost on return from page2 (because are reloaded on pageload from db).How can i save control status between pages round trip?

View 3 Replies

State Management :: Get The Correct Concept For State Management?

Aug 16, 2010

i need to know the full concepts state manegemnt in asp.net,..in which site i will get the correct concept for state management....

View 4 Replies

State Management :: Hidden Field Value In User Control / Make The Hidden Field Save Its Value?

Mar 23, 2011

I have a custom user control which contains a asp hiddenfield object. The value of this hidden field is being set using javascript and I have verified that the value is being set properly. When a postback occurs the new value is not being saved and I cannot access it in my code.

I believe the problem is because the user control is not saved in viewstate and therefore the hidden field value is not saved accross postback. How can I make the hidden field save its value? I tried accessing it from the early page cycles and still no luck.

View 4 Replies

State Management :: Application State And Session State?

Oct 2, 2010

User Interface: 2 Labels; 1 Buttons

Requirements: Create a Web Page in ASPx that will do the following:

1)One label will provide a count of how many times Button 1 has been clicked in the current session.

2)One label will provide a count of how many times Button 1 has been clicked by all users of the application. The Application Code for the Button should start at 100 (set this in the Global.asax file). this is what i have so far but i cant seem to get the application state to work properly.

aspx.vb

Partial Class _Default
Inherits System.Web.UI.Page
Dim clickcount As Integer

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

If Session("ClickCount") Is Nothing Then
clickcount = 0
Else
clickcount = CInt(Session("ClickCount"))
End If
If Not IsPostBack Then
If Request.Cookies("UserName") IsNot Nothing Then
Label1.Text = "Welcome Back " & Request.Cookies("UserName").Value & "."
End If
End If
Dim clickCounta As Integer = CInt(Application("ClickCount"))
End Sub
Protected Sub PostBackSession_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles PostBackSession.Click
clickcount += 1
lblClkCnt.Text = "Current Click Count is " & clickcount
Application.Lock()
Dim clickCounta As Integer = CInt(Application("ClickCount"))
clickCounta += 1
Application("ClickCount") = clickCounta
Application.UnLock()
AppClick.Text = clickCounta
Dim nameCookie As New HttpCookie("UserName", _
TextBox1.Text)
nameCookie.Expires = Now.AddYears(1)
Response.Cookies.Add(nameCookie)
End Sub
Protected Sub PostBackSession_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles PostBackSession.PreRender
Session("ClickCount") = clickcount
Application("ClickCount") = clickcount
End Sub
End Class
global.asax
<script runat="server">
Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
Dim clickCounta As Integer = CInt(Application("ClickCount"))
Application.Add("ClickCount", 0)
End Sub
Sub Application_End(ByVal sender As Object, ByVal e As EventArgs)
Dim clickCounta As Integer = CInt(HttpContext.Current.Application("ClickCount"))
End Sub
Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
' Code that runs when an unhandled error occurs
End Sub
Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
End Sub
Sub Session_End(ByVal sender As Object, ByVal e As EventArgs)
End Sub

View 3 Replies

State Management :: Data Caching C#.net

Aug 20, 2010

I have a large SQL Database in the server from which I can create a dataset of about 10000 rows. My question is about caching this data. Which type of data caching should I choose (Server side or Client side)? Which one will provide better performance?

View 5 Replies

State Management :: Session Mode State Server - Sending Asynchronous Request

Nov 5, 2010

Customer were getting "View State Validation Error" due to worker process recycling at our production webserver and to fix that i applied machinekey and then move my Session state Mode from In Proc to State Server to retain session data and not kick out the customer to relogin. I had serialization issue with one object which has to be stored in session but when i moved it out of session i could able to resolve the issue.

But doing all these i was partly successfull in keeping the user in their session when Worker Process recycle event occurs.I was able to refresh the page or make a post back by clicking the refresh button and also able to retain the session values. But the Problem occurs when sending asynchronous request to server which we do periodically every 15 minutes from the moment the user logs in.The web page doesnot update data on website when sending asynchronous request.By Debugging I found at this particular code point it fails to make a postback which is required.

<%=GetHintFromServer%> (When there is no Worker Process recycle i t gets replaced by
WebForm_DoCallback('__Page',message,ShowHint,null,null,false) on postback) Everything works fine when there is no Worker Process Recyling but when it happens looks like sending request asynchronously using javascript fails .Remember When I make a post back by manually clicking submit button everything works fine.

SendRequest(Asynchronous)
function SendRequest(msg, isBusy, chartMsg, vesselMsg)
{
try
{
//confirm("msg"+msg+"isBusy"+isBusy+"chartMsg"+chartMsg+"VesselMsg"+vesselMsg);
_busy = isBusy;
if(chartMsg != null)
{
//confirm("chartMsg"+chartMsg);
_element.SetMessage(true, chartMsg);
}
if(vesselMsg != null)
{
confirm("chartMsg"+vesselMsg);
_element.ShowVesselLoading(true, vesselMsg);
}
_stuckWatchdog = setTimeout( "ClearPendingRequest();", 60000);
var message = msg;
var context = '';
<%=GetHintFromServer%>
}
catch(e)
{
alert( "Exception error on SendRequest(): " + e);
}
}

View 2 Replies

State Management :: Custom Control: State Restoring For Controls Created With CreateChildControls

Dec 22, 2010

Let me explain, describing the scenario:In a custom server control (in my case, derived from CompositeControl), in the overidden CreateChildControls method I create a complex tree of subcontrols, using information from a db.The db provides both information on which controls I need to create (the user interface's structure) and the data used to fill these controls.Than the user can interact with the control and change the data (that becomes different to what stored on db).

My custom control lives in the same page where there are other controls, obviously.And these controls can cause a postback at any time.What I need is that my custom control keeps the data entered by the user across these postback, without reverting to the original data and loose the user data entry.

Here is the first doubt:

1)I create the subcontrols dinamically in the CreateChildControls at any page refresh (both on first call than on postback).I know that the framework solves the reference between the posted data and the controls I create in the CreateChildControls in order to set properties and raise control events, but can you tell me when and how it actually does this? In which phase of page life cycle? What happens after the CreateChildControls?

A second doubt:2)If the user interface structure must change as a consequence of the data entered, I had to execute CreateChildControls twice (the first time to recreate the original interface to get the events and the second time to create the new interface)
In which phase of page/control lifecycle do I have to make the second call to CreateChildControls? I do it on Prerender now, but is it right or wrong, and why?

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved