AJAX :: Persist Property Value Between Callbacks

Nov 2, 2009

I store a variable in the viewstate using a property :


but the value is not persisted through the callbacks. it always revert to 50 like ViewState["itemsPerPage"] is always null.

View 6 Replies

Similar Messages:

Web Forms :: Modify A Common Property Via JavaScript And Persist It?

Dec 15, 2009

I am trying to modify a property in a GridViewRow...

I want to turn the display to 'none', but when I do any postback on the page, it doesn't persist... the page render again displaying the row...

But when I try it with the text in a TextBox, it persists!

View 5 Replies

State Management :: How To Make A Custom Property Or A Page Persist Across Postback

Sep 29, 2010

I have an object to hold some specific state information in my web application - I pass it back & forward between pages by making it a property of a basepage which works fine, but I lose it on postback.

Is there any way to persist this property without manually adding & reading it again from viewstate?

View 3 Replies

Difference Between Client Callbacks And Ajax Page Methods?

Aug 25, 2009

Based on my understanding, both of them essentially do the same thing (lets us execute a server side method from JS). Are there any differences?

Also, Ajax Page Methods can be implemented either using JQuery or using ScriptManager. Which one is preferred and why?

View 6 Replies

JavaScript - How To Implement Super Fast AJAX Callbacks/PageMethods

Feb 7, 2011

I am designing an ASP.NET web application (.NET 4.0) which basically has a page that should interact with the code behind every 1-2 seconds (Using Client callbacks or PageMethods via ScriptManager or jQuery.ajax) It'll be hosted on an intranet, so a 1-2 second refresh rate is kind of reasonable.

How can I make the page to access the web service/pagemthod in the code behind in a timeply manner (e.g. every 1 second). Should I use a javascript timer (I'm not familiar with javascrip very much)?

Although the site is hosted on an intranet, but I still need to implement a good approach to reach the desired refresh rate. the amount of data being transfered is about 1KB in each interaction. What are your recommendations on my design regarding this? (using callbacks or ScriptManager or jQuery.ajax,...

View 3 Replies

How To Force DOM Modifications Done In Success Function Persist Within A JQuery.Ajax() Call

Jun 20, 2010

I am getting a JSON object from a webMethod by the call below and I set some textBox values based on the returned objects attributes.Problem is, just for a moment my textBoxes are populated but then immidiately they return back to empty.Do I make a mistake or I cannot make DOM elements modifications within a success function?

var ajaxCallOptions = {
type: "POST",
contentType: "application/json; charset=utf-8",
url: "/JQuery/Chapter16-AJAX/PersonWebServices.asmx/GetPerson",

View 3 Replies

AJAX :: UpdatePanel - GridView - DataSource Null - Get The Datatable To Persist Between The Two Update Panels?

Jan 17, 2010

I am going to outline my setup then where i am failing

UpdatePanel1 - Contents : 3 textboxes and AddButton
UpdatePanel2 - Contents : 1 GridView and SubmitButton

AddButton adds new row to DataTable with data from textboxes, binds DataTable to GridView SubmitButton sends data to database. The Adding of a row works to add the row to the gridview, but it won't add a second or third and so on, only adds the 1. SubmitButton belives the DataTable that GridView is databound to is null and won't send anything to the database. How can i get the datatable to persist between the two update panels? Do i use Sessions as my storage location? Page


View 2 Replies

Web Forms :: Updating A Label With Callbacks?

Jun 14, 2010

I'm using a third party control which fires a server side method when a document gets saved. Should there be any problems with saving, I'd like to display a message on the client side, such as:


Doing that in server side doesn't work after discovering IsCallBack = true.

How do you update lblMessage via CallBack without a full PostBack?

View 10 Replies

Client Callbacks With Master Pages?

Aug 30, 2010

I'm following this example: [URL]

And I can get it to work with just a single page and a code behind, but when I add a masterpage, the examples doesn't work properly. Within my master page, I have a head content section and a body content section. It's nothing fancy.

How do i do client callbacks with master pages?

View 2 Replies

C# - Scriptmanager RegisterStartupScript Does Not Work On Callbacks

Feb 8, 2011

I am using a third party UI Library (devexpress) to implement some data grids. These grids work with Callbacks (not UpdatePanel partial Postbacks).

I am trying to use Scriptmanager RegisterStartupScript to execute some code on the client after the callback. This works great with partial postbacks but does not work with Callbacks.

Is there any way to queue client side code for execution inside the callback server side handler?

View 1 Replies

Javascript - Add Callbacks To Jquery Validation (when Used In MVC 2)?

Oct 6, 2010

I'm using jquery for validation in my MVC2 web app (as described here) and I'd like to wire up some callbacks that the jquery validation plugin supports, like invalidHandler, etc.

I can manually edit the MicrosoftMvcJQueryValidation.js and add my callbacks (in __MVC_EnableClientValidation, in the options variable) but I was looking for a better approach since that file is used repeatedly and I don't want to have to create one-off copies.

A way to manually add an invalidHandler (etc) callback to the form validation, would be exactly what I need. Obviously this would normally be done via the options when calling validate() for the first time, but since Microsoft controls that particular part, that isnt an option.

View 1 Replies

Web Forms :: Multiple Server Callbacks (NOT POSTBACKS)?

Oct 22, 2009

I have 2 different javascript client side functions that are on timers. When the timers elapse they do a server callback and check for pending data. The first one executes perfectly by itself. The second one calls back and receives data perfectly as well...by itself. The problem I have is that when they are both enabled they *seem* to step on each other as there is only one conduit to the server and back.So I have everything segregated up to that point. To my knowledge I only have one...Page.ClientScript.GetCallbackEventReference.... to work with. Is there any way to keep them seperate. To my thinking what would be ultimate would be to have two DIFFERENT CallbackEventReferences for each clientside javascript function to use as its own.

View 5 Replies

Implementing Client Callbacks Programmatically Without Postbacks In Web Pages

May 6, 2010

Apropos MSDN link: [URL] [.NET Framework 4 - ASP.NET] Implementing Client Callbacks Programmatically Without Postbacks in ASP.NET Web Pages Using the code from the above link in the following code snippet, if you keep a break point on the statement "if (IsPostBack)" in the Page_Load event. The control moves into the "if (IsPostBack)" block after the alert, which mean that it is a Postback. Then, how come you say "...Without Postbacks"? I am getting confused here.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" [URL]>
<script runat="server">
string aStringValue;
public void RaiseCallbackEvent(String eventArgument)
aStringValue = eventArgument;
public string GetCallbackResult()
return aStringValue;
protected void Page_Load(object sender, EventArgs e)

View 2 Replies

Web Forms :: Implementing Client Callbacks Programmatically Without Postbacks?

May 6, 2010

Apropos MSDN link:


[.NET Framework 4 - ASP.NET]

View 2 Replies

JQuery :: Modal Popup That Allows Callbacks Or Asynchronous Calls Without Losing The Popup?

Aug 7, 2010

any modal popup controls whereas I can interact with the controls, causing callbacks and asynchronous calls without losing the popup.

I tried with the modalpopupextender, but the popup will disappear with the call and re-rendering the popup like many people will cause massive flashes of the popup which i want to try and avoid.

View 1 Replies

AJAX :: Finding Auto Post-back Property Workable When Using Ajax CascadeDropdoenList?

Dec 4, 2009

I'm using Ajax CascadeDropdownList and it's working ok. But I need to execute DDL_SelectedIndexChanged in my web form for the second DDL. As I'm using Ajax CascadeToolkit AutoPostBack=True is not working and DDL_SelectedINdexChanged is not working as well. But I have to have it.

View 3 Replies

Web Form And Ajax Data Lost On Post Back - Finding Possible Cause / Ajax Or Changing Visible Property

Sep 15, 2010

I have two Repeater controls, each hosted in a user control. Both user controls are contained in the same aspx page. Only one User Control is visible at any one time. The repeaters are comprised of checkboxes, and text boxes for user input.

The aspx page is configured with an Ajax ScriptManager; and contains several Ajax UpdatePanels. These UpdatePanels result in partial page post backs when text is changed in a textbox control in controls on the aspx page (this is not the behaviour for the Repeaters in the User Controls). Through use of several AsyncPostBackTriggers, various controls contained in the other UpdatePanels on the page have their content refreshed in response to the partial page post backs they are configured be notified about.

Depending on a radio button group selection, I set the visible property to true or false - as appropriate for the User control containing a repeater control. The Repeater control is then populated with data using databinding. All of this works.

However, when the Submit button is clicked, the Repeater control contains no data.

Given that I am not dynamically adding the Controls containing the Repeater controls (but using Visible true / false). I would have thought that the State of the fields and the data in the visible control would be preserved during the post back.

The User Controls are contained within the UpdatePanel that contains the Submit Button.

I have explicitly Enabled View state without any effect.

Am I correct in assuming that I should not have to do any explicit handling of data changes the user makes (via client side script and manipulation of an Data Structure Representing the Repeater Data); and the View State should maintain the data I need to access on the server when submitted?

I do not believe that it is the User Control visible state changes that are causing the issue because when the page is initially loaded on of the User controls is populated with dummy rows (so it displays).

I am suspicious that because the visible state of the controls is changed during partial page post back, that the Page View State ends up with no knowledge of the User Control and therefore cannot track its data (or changes).

View 1 Replies

C# - How To Persist Authentication From One Web App To Another

Feb 18, 2011

So my company has an ASP.NET web app, targeting .NET 3.5. I am tasked with building a ticketing system for them. I don't really need to use any resources of the company app, except for authentication. I would like to target .NET 4.0 and use the 4.0 goodies like entity framework and mvc 3.0. If I create an application targeting .net 4 nested within the main web app in IIS, is there a way to persist authentication so they do not require a different session within the 4.0 web app?

View 2 Replies

How To Persist Password Across Postback

Jul 9, 2009

i have a form with 2 password fields in it and when the page is post back on validation, the password value is lost

View 4 Replies

MVC :: Can DataAnnotations Persist Through Serialization

May 24, 2010

I am using business objects that are accessed via webservices. These objects can be loaded via the webservice and serialized to my mvc app. The mvc app can get a web reference to the objects and they can be utilized in the mvc app. However, the business objects are where the classes are defined, and where the annotations are applied.

The mvc validation seems to have no idea that there are System.ComponentModel.DataAnnotations attributes applied to this business object class.

1) Are DataAnnotations lost when objects are serialized / deserialized?

2) If in mvc I use a view model approach, and have nested objects (which themselves have public properties - decorated with DataAnnotations) can/will the mvc validation system traverse the entire object model, the model being used for my view? (so it can see DataAnnotations attributes of the nested object)?

View 1 Replies

How To Login Via SSL Persist When Switching To Non - SSL

Apr 5, 2010

I have an application I would like to force SSL on the login page and on the page that the CC is entered on. I would prefer to keep the rest of the application free of SSL.

I have the code working to force SSL on certain pages, and remove SSL on others. The problem I have is that if I log in with SSL enabled the user is only authenticated on the pages that are SSL. The reverse holds true as well, if the user logs in without SSL they are only authenticated on pages without SSL.

What can I do to have this persist between the two. Is this using cookies or the session?

View 1 Replies

How To Persist A Variable On A Page

Nov 23, 2008

ive declared a custom type variable (structure) on my page in the position as shown below, but at very postback its values are reset as if i just declared it; for example if i assign a value on the button click even or on a ddl item change event the value is correctly stored when the sub ends but as when i access the same value or the structure again in the page, everything is gone, all strings type paramaters of the structure are set to null back again.


View 2 Replies

MVC :: How To Persist Search String

Mar 5, 2011

Site.Master contiains search form using code below. After pressing submit button entered search string is reset since whole page is re-loaded. How to persist search string so that search field contains enterread value after page is re-loaded ?


View 13 Replies

How To Persist Session Values In .Net

Mar 9, 2011

I'm implementing IHttpHandler and IRequiresSessionState and I'm using context.Session but after I set up a value in Session, it's lost in the next request. What can I do to persist the values ?

url: "/test.test",
type: "POST",
data: "{'type':'GetStep'}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (result) {...}

The second call is similar to this, but the values that get set when I call this function are also lost on the next request.

public void ProcessRequest (HttpContext context)
context.Session ["Game"] = new Game (); // next time it is null

How do I persist values in Session state in ASP.NET ?

View 1 Replies

Persist A Change In A DBML?

Jun 24, 2010

I have a table of users called Users

And a view called UsersActive that filters out deactivated users.

When I create my DBML, I drag the Users table in, then I change the property on the table to point to UsersActive.

This works well, until the DBML gets re-created.

Does anyone know how to fix this?

I've tried overriding the


attribute in a partial class but get the error:

Duplicate 'Table' attribute

View 1 Replies

How To Persist Page State Across Pages

Mar 24, 2011

I need a way to save and load the Page State in a persistent manner (Session). The Project i need this for is an Intranet Web Application which has several Configuration Pages and some of them need a Confirmation if they are about to be saved. The Confirmation Page has to be a seperate Page. The use of JavaScript is not possible due to limitations i am bound to. This is what i could come up with so far:


I can't seem to find a way to load the Page State after being redirected from the Confirmation.aspx to the PageToConfirm.aspx.

View 1 Replies

How To Persist The Data From A Repeater After Postback

Jul 1, 2010

I have a repeater that displays financial data and prices for various stocks.

On this page, I also have an "export" button that needs to take the data ~on the screen~ and convert it into a CSV for the user.

The problem is, after I databind my list of "Stock" entities:

List<Stock> stocks = GetStocks()
rptStockList.DataSource = stocks;

The data is not persisted on postback.

Also, the data on this page is constantly being updated via an UpdatePanel and a Timer control (being re-databound each time). Every 30 seconds the prices displayed for the various stocks in the repeater control change.

Now, I have a linkbutton that has a click event method in the code-behind that is supposed to export the ~data on the screen~ for the user. I need to grab the current values for the list of stocks last databound to the repeater. I can't simply go grab the latest values from the database because those will have been changed in the time between the last refresh.

protected void lbtnExportStocks_Click(object sender, EventArgs e)
// No longer have the stock data used in the repeater control

I know that ASP.NET doesn't persist the datasource for the repeater on post-back but I need to still be able to either re-construct this list of Stock entities so I can send them the CSV or I need persist it in some way.

I don't want to do anything that is too heavy handed in terms of performance because during certain days of the week this application can have some heavy usage.

What is the proper solution to this type of situation? Should I iterate through the Repeater's "Items" collection and reconstruct the Stock entities?

View 4 Replies

What's Best Way To Persist Login And Password SQL Server - Uses SMO?

Oct 21, 2010

I am creating a simple web management studio using SMO. Is it secure enough to persist/store user information (login and password for database) using ASP.NET mechanism (e.g. formsauthentication, cookies, etc.). What will be the best practice to do this?

View 1 Replies

How To Persist Javascript Changes On The Server Side

Jan 6, 2011

how to persist javascript changes on the server side.For example if I added items to a drop down list client side, how can i persist them in order to read them on the server side.By the way, Telerik control have this feature.

View 2 Replies

C# - How To Persist Graph Data For Website

Nov 1, 2010

We've worked out some of the tasks on our website can be efficiently solved by maintaining the data using a graph structure. But we don't have much of an idea about how the graph is best persisted. Further we want to write and read simultaneously in an efficient manner in out asp.net app so it needs to handle multiple threads. It doesn't need to be super fast but it needs to be scalable to handle potentially millions of nodes.

I don't want to hack my own system and have heard of Neo4j. Lots of Java developers seem to recommend it to one another. Obviously I'm on the .Net platform and prefer to not have to switch.

What are the available options, particularly on the .Net platform?

View 1 Replies

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