State Management :: Values Lost After Callback?

Mar 22, 2011

In my webapp page i load a custom user control, this uc loads data from an xml file in a JSGrid. All this works fine and uses callbacks. The uc is the callbackhandler and thus implements the icallbackhandler interface. Now, i gave this uc some properties, like the path to the xml file. After each callback the uc loses the values of its properties. Currently i'm including the path in each callback itself so i can load the file each time i need it, but this isn't the good way i think.

I tried solving this with viewstate but it doesn't work, a callback also seems to erase the values of the viewstate.

Is there a way to keep these values stored in the uc instance? Maybe a way to disable the erasing for each callback?

Also each callback contains "Changes", this has al the changes that were made to the grid. So when all the changes were made in the grid, i want to get these changes in my page that contains the uc in order to decide ther what to do with this data.

View 1 Replies


Similar Messages:

State Management :: Lost Object Values In Postback?

Aug 10, 2010

I create a class with some atributes.In a web form, I declare a public object like this.Partial Class Intencion

View 7 Replies

State Management :: Application Crashes - Lost All Values Of Dropdown

Jul 23, 2010

I have a web form with a whole bunch of drop down lists (mainly) that works perfectly well and has been for some time. However, we've found a scenario that seems to corrupt the viewstate of this form in someway, or cause it to lose it's viewstate. The problem occurs when the user has this form displayed, then clicks on a link that opens up another window. A few more steps to open up a second and third window, followed by a write to the database. Then the user closes these windows down, leaving this original window open. At this point, the user selects something from one of the dropdowns. And the app crashes because the dropdowns have lost all of their values (and so a bit of code that is trying to work with one of the ddl's selectedvalues fails).

When the user selects this dropdown, the page_init event fires, followed by the page_load with postback = true. The dropdowns themselves are defined in the aspx page markup, but the values of them are generated and added in page_load (where postback = false). I've relocated the code to populate these controls to the page_init code and now the app doesn't fall over, because the values are re-populated. However, all of the selectedindexes are being reset, so the original values are lost and the screen redraws after this postback with all of the dropdowns reset.

View 1 Replies

State Management :: Lost Some Values From Collection Stored In Session Variable?

Jul 27, 2010

I am creating a presentation on basis of some selected values and maitaning the selected values in a session variable named Session("userPref") in collection form.

Now I am opening a TablePreview.aspx page by javascript window.open() function.

On Page_Load of TablePreview.aspx I am reading some values of Session("userPref") and doing some operatons.

For saving the presentation I have created a page wizardsave.aspx.

Now I am opening the wizardsave.aspx from TablePreview.aspx by window.open() function for saving presentation, but on Page_Load of wizardsave.aspx. I found that some value from collection stored in Session("userPref") have lost.

View 4 Replies

State Management :: SQL Session State Lost After Close Browser?

May 3, 2010

I'm not sure if this is an error or is the right work mode for sql sessions.

I'm working now with Windows 2008 R2 Web Ed. and SQL Server 2008 Web Ed.

When I close my browse and open again a new browser window I need to login again in asp.net application and a new session is created in the sessions table in sql server.

It's this normal? I remember that with Windows 2003 and SQL 2005 this doesn't happend. When I closed my browser and open inmediately a new browser window my session was retained and I could continue working without relogin.

View 3 Replies

State Management :: Session State Variables Getting Lost?

Jun 28, 2010

I am working on an asp.net website using C#. The site deals with orders and therefore order lines. I would like to store the order in memory whilst it is being populated (with order lines) and once it gets submitted write it to a database.

The above logic has been implemented, but sometimes when accessing session state or storing a variable in it information gets lost. Take note that the web server is running a dual-core processor. I am also using the in proc session state server.

I tried changing over to using the out proc session state server (asp.net state service), but it requires serialization. Since the order and orderlines are actually linq to sql classes, the entitysets and entityref's fail to serialize.

Does anyone know the reason why session state loses information occasionally and possibly how to eliminate the problem?

View 4 Replies

State Management :: Session State Gets Lost?

Dec 16, 2010

I have a problem with a couple of web sites where my session state gets lost prematurely.

I use the Inproc session provider and Asp.net 2.0. Which of these are true:

The antivirus software disturbs the session. IIS recycles the app pool every 2 hours and it does not retain the sessions during a recycle. Index server disturbs the session. Anything else that can have disturbed the session?

View 3 Replies

State Management :: System.ArgumentException: Invalid Postback Or Callback Argument

Oct 29, 2010

Is there a good way to test and debug these errors. I constantly get them emailed to me from my production site but I can not duplicate them. Below is the entire error.

User: jbrown
IP: 74.202.255.133
Session[STUser] = DAL.stUser
Session[PlaylistName] = Adult Contemporary Holiday Blend 2010 (vol. 2)
Session[PlaylistId] = 3865
Session[SES-FAN] = SessionFan
Session[fullPreview] = yes
System.ArgumentException: Invalid postback or callback argument. Event validation is enabled using in configuration or <%@ Page EnableEventValidation="true" %>in a page. For security purposes, this feature verifies that arguments to postback or callback events
originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.
RegisterForEventValidation method in order to register the postback or callback data for validation. at System.Web.UI.ClientScriptManager.ValidateEvent(String uniqueId, String argument) at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String
eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Exception of type 'System.Web.HttpUnhandledException' was thrown.
System.Web
at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean
includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.brandbrowse_aspx.ProcessRequest(HttpContext context) in c:WindowsMicrosoft.NETFramework64v2.0.50727Temporary
ASP.NET Files
oote6fbb3019956ec5aApp_Web_u-x9w715.8.cs:line 0 at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep
step, Boolean& completedSynchronously)

View 3 Replies

State Management :: Multiple Servers - Data Lost

Apr 16, 2010

I have 2 front end servers and 2 back end servers. There is a registration form in my web application. The registration form uses a Microsoft Wizard control. Lets say the Wizard control has 4 steps. After the fourth step, users click "Finish" and I display the "Thank you Message". The way the request is routed between the 2 servers is round robin. So lets say till the fourth step, the response comes from server A. After the user clicks "Finish", lets say the response now comes from server B. After they click "Finish", I am trying to access some information in the Wizard control (like Name, address and so on). Because the servers are now switched, the data is lost (at least thats what I think is happening). So all entries in the wizard control are now blank and when I try to read those values, they are null.

View 8 Replies

State Management :: Web Application Class Data Is Lost

Jul 14, 2010

i have an asp.net web application.

[code]....

When i click button 1, a new list is created. But when i click button 2, it gives me error, saying that its a null list.

The changes i did in Button1_Click() are somehow rolled back. I want to keep the changes.

View 5 Replies

State Management :: Session Variables Value Lost Between Pages?

Nov 23, 2010

I am using Session ID Manager in all the pages of the website, but I am losing session variables in between the pages. what should I do to save the values of session variables.
Anoop

View 5 Replies

State Management :: Session Variables Lost In IFrame

Dec 13, 2010

I have session variable that is created in EditPlaylist.aspx. Edit.aspx is loading EditPlaylist.aspx in an iframe.

[Code]....

View 5 Replies

State Management :: Session Data Getting Lost For Few Variables

Apr 19, 2010

I am using Windows xp/ .net 2.0 / vs 2005 for development environment. My session data (not all session data) are getting lost when I try to navigate between pages through window.open but the same is working perfectly in proc mode but in state server / sql server mode I am facing the problem.

View 9 Replies

State Management :: Sesion Value Lost When Website Is Live?

Apr 10, 2010

Now i have faced some strange problem.I have added an arralist into session.And then accept it from another page .Every thing is work fine when locally(visual web developer).But when uploaded most of time error occured "System.NullReferenceException: Object reference not set to an instance of an object.".why?pls help me..

View 8 Replies

State Management :: Session Lost When Window.open Is Used In IE 8?

Jun 10, 2010

Existing applications works fine with IE 6 and 7, the problem occurs only with IE 8. A new session is created everytime a window.open is used to open a new asp page. This does not happen in IE 6 or 7.

View 2 Replies

State Management :: Sessions Consistently Lost- Until Repeat Visits

Apr 23, 2010

I have a session state that myself and others on my team have been bashing our heads against the wall for the past week. We have tracked it down to the following:

1) Frame page containing content pages creates a session

2) Content page creates a session, stores data in the session

3) User changes drop down list with SelectedIndexChanged autopost back and displayed fields are changed using an UpdatePanel. A new session is created, data stored in the prev. session is lost
4) User posts back, no session is created this time, however the post back fails because the session from step 2 is lost.

Now, a user closes the page, comes back, and it actually starts to work:

1) Frame page containing content page opens (no new session)

2) Content page loads data, stores in session (no new session)

3) User changes drop down list with SelectedIndexChanged auto postback and displayed fields are changed using an UpdatePanel. Sesson NOT lost

4) User posts back form, success

ASP.NET on the first visit to the site insists on creating 3 sessions, we log it in Session_Start. I can't think of any reason this should happen. I've been told the frame will always be on a seperate session; thats fine, its only being used to setup scrolling
within a frame in Dynamics CRM. The biggest question is why when we insert data into the session in step #2, it is discarded in step #3.... but only during the first visit to the page!

I've never seen this session behavior before; we don't have any session abandonments in our code, and we never clear session objects, so there shouldn't be any reason for the session to be lost.

View 2 Replies

State Management :: Lost Session After Finish Proccess.start In 2.0?

Mar 8, 2011

I need to run a exe file in server. I use proccess.start to do this. When the process.start finish then the session is lose and I lose the user with I login.

View 1 Replies

State Management :: Session Lost When Multithreading Though ( There Is A Wait Call ! )?

Mar 9, 2011

I am creating a multithreading application and I am using countdownevent to signal my object arround 3 times and using wait , but somehow the session goes null , although I am setting a breakpoint after mycountdownevent.wait() and the breakpoint isnt reached , that means the execution is not done...so can someone tell me what is wrong?? here is my code :

this is the main thread

[Code]....

this is the upload image method :

[Code]....

and this is a property for the countdown event :

public
CountdownEvent
_3adasehCountDownEvent;

View 7 Replies

State Management :: Session Data Lost On Postback Of The Page In Windows XP?

Apr 26, 2010

asp.net session data lost on postback of the page in windows XP.

View 4 Replies

State Management :: Viewstate And Dropdownlist / Initial Selection Is Lost Each Time The Page Refreshes

Jan 13, 2011

I have a simple search page with a drop down list that I would like the value to persist on refresh..basically the user will select their location from the dropdownlist and this will be used to populate a gridview. After this the page is set to refresh at a set interval and use the same location data initially selected by the user. However the initial selection is lost each time the page refreshes.

p.s system is to old for ajax!

<meta http-equiv="Refresh" content="300" />
<script runat="server">
Dim connectionString As String = ConfigurationManager.ConnectionStrings("****").ConnectionString
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
If Not IsPostBack Then
Dim conn As SqlConnection
conn = New SqlConnection(connectionString)
Dim Locationcommandtext As String
Locationcommandtext = "SELECT * FROM [Location] ORDER BY [Location]"
Dim loccomm As SqlCommand
loccomm = New SqlCommand(Locationcommandtext, conn)
Dim reader As SqlDataReader
Try
conn.Open()
reader = loccomm.ExecuteReader()
Locations.DataSource = reader
Locations.DataValueField = "LocationID"
Locations.DataTextField = "Location"
Locations.DataBind()
Catch ex As SqlException
Response.Write("SQL Error:
" & ex.ToString())
Finally
conn.Close()
End Try
Else
'"Viewstate should kick in here"
End If
End Sub
</script>

View 6 Replies

State Management :: Session State Returning Null Values?

Apr 29, 2010

I have a clear button and a textbox in an aspx page. I set the session variable in this page as

String str = Textbox1.Text;

Session["TypeIds"] = str;

and I clear the sessions in a clear button event as

Session["TypeIds"]=null;.

Then when the user types some value in the textbox ,on Response.Redirect on another aspx page, the session variable returns null values.It does not retain its session state. The session state has to be maintained in the next page. Is it because this clear button event and setting explicitly to null creates this problem?

View 7 Replies

State Management :: Maintain Query String Parameter In All Pages - It Gets Lost In Subsequent Pages

Aug 9, 2010

In my Application_BeginRequest I have code that gets query string value ?c=FR or ?c=US and store it in cookies.Based on query string value I have either US or FR,locale is selected from locale table.If ?c=FR then locale will be fr-FR and if it is US then locale will be en-US.My code is below.

void Application_BeginRequest(object sender, EventArgs e)
{
LocalizationInfo loc = GetLocalizationInfo();
if (Request.Cookies["Localization"] == null)
Response.Cookies.Add(new HttpCookie("Localization"));
Response.Cookies["Localization"]["Country"] = loc.Country;
CultureInfo objCI = new CultureInfo(loc.Locale);
Thread.CurrentThread.CurrentCulture = objCI;
Thread.CurrentThread.CurrentUICulture = objCI;
}
public static LocalizationInfo GetLocalizationInfo()
{
string countryCode = "";
string sLocale = "";
if (HttpContext.Current.Response.Cookies["Localization"]["Country"] != null)
countryCode = HttpContext.Current.Response.Cookies["Localization"]["Country"];
if (!string.IsNullOrEmpty(HttpContext.Current.Request.QueryString["c"]))
countryCode = HttpContext.Current.Request.QueryString["c"];
if (countryCode == "")
countryCode = "US";
sLocale = HertzRent2Buy.DataProvider.ListData.GetLocale(countryCode);
LocalizationInfo ret = new LocalizationInfo();
ret.Country = countryCode;
ret.Locale = sLocale;
return ret;
}
public struct LocalizationInfo
{
public string Country;
public string Locale;
}

Now when I run the project and in query string I set [URL] then for the very first page(home page itself) it shows me French translation,but on subsequent page,that query string parameter ?c=FR is lost and hence it shows be English translation not French translation since it does not pickup French resx file.If I manually append ?c=FR in subsequent page then it shows the French translation.Is there is way how I can make that query stringparameter available in all pages.Structure is there to hold Country and locale variables. In all pages I am calling GetLocalizationInfo() method as follow

LocalizationInfo info = some.DataProvider.Globalization.GetLocalizationInfo();

And I create instance info to pass locale and country as parameter. GetProductDetails(id,info.Country,info.locale). why my query string parameters get lost on subsequent pages.

View 1 Replies

State Management :: Session Gets Lost When Set Session Response.cookie

Jan 25, 2011

I need to make my asp.net session cookie as secure but whenever i check user authentication and after that i am trying to set cookie to true then my session lost my user information and so it always redirect login page. I am settings user to HttpContext.Current.Session["user"] and check every time, is user is valid and if valid then move ahead. but before that i make my asp.net session cookie as true.

[Code]....

but after that i observe that somehow "Session_Start" event gets called.

View 1 Replies

State Management :: How To Pass Values From One Webpage To Another

May 31, 2010

i need to pass the roll no from one page to another and have written the code but the code is not working

in the first page

Response.Redirect("userview.aspx?RollNo=" & TextBox1.Text)

then in the target page

dim rollno1 as string
Public Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)

View 14 Replies

State Management :: Pass Values From One Page To Another

Jul 28, 2010

i have a requirement where i need to pass values from page1 to page3. In page1 i have 3 textbox and 2 drobdownlist and one button named NEXT. In page2 i have 10 textboxs and button named Next button. In page3 i have 10 textboxs and Submit button. when Next button in page1 is clicked it goes to page2 and then to page3. In page3 i need to submit all the values of page1 and page2 to database. Is there any way to pass all the values of page1 and page2 to page3 without using sessions

View 7 Replies







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