AJAX :: Passing Data To The Client And Back?

Aug 31, 2010

(I think) with using a data bound Custom Control on the server to get hold of my data (it will be part of a larger dataset) and to ultimately pass updates to the database. The bit I'm researching at the moment is passing that data to and from the client.One way to pass the data to the client is to use JSON within the Pageload event to construct a set of Javascript objects (one per row in the data). Is that the best way, or am I missing something?

Then, after the data has been manipulated on the client, I need to pass the rows back again so that the server side code can pick them up and process the updates. I've seen a suggestion on here that a hidden text field is one way to do that. Is it the best?Neither of my approaches seem to be at all elegant - and I suspect that I am missing something fundamental in ASP .NET AJAX!

View 3 Replies


Similar Messages:

Best Practice For Passing Exceptions Back To Client?

Apr 28, 2010

If my web method throws an exception, what is the best practice for passing that exception to the client?

View 1 Replies

Jquery - Passing Back The Client Side Style / Class Change To The Server During Postbacks?

Feb 9, 2010

I'm dynamically binding tables and sub tables using nested listviews. On the client side I have a piece of jQuery that is toggling the visiblity of TRs witin the tables in order to provide a group expand / contract view option.

On postback I'm obviously loosing my class changes that I have applied via jQuery. I'm wondering what the best approach to maintaining these client side class changes is? I've considered creating a hidden input control per table to store the indexes of the visible TRs at the time of expanding them. The intention being to then look for the indexes during postback / rebinding and add the visible classes to each corresponding element.

Is there a better approach or some native method of passing back the client side style / class change to the server during postbacks?

View 1 Replies

Javascript - How To Return Data After AJAX Postback Back To The Client

Feb 4, 2010

I have a simple question - I use update panel with custom server control inside. I call __doPostBack from javascript and RaisePostBackEvent on the server fires (I implement IPostBackEventHandler).This is client to server call. Could I return data back to the client (after this partial postback)? What is the best way to achieve this?

View 2 Replies

C# - Can Retrieve Data From Server To Client During An Asynchronous Post - Back Using Ajax Library

Apr 9, 2010

ASP.NET Ajax Library provides some client-side events. For instance:

Sys.Application.add_load(
function(args) {
// handle the end of any asynchronous post-back. Every-time there's
// a server round-trip, this method will be called.
}
);

During the asynchronous post-back I want to retrieve information to the client. This information must be available in some event like the discribed above.

Does the UpdatePanel or the ScriptManager have any server-side way to retrieve data back to client during an asynchronous post-back?

View 1 Replies

Ajax - How Do Partialviews Work In MVC When Passing Parameters Back

Mar 11, 2011

I have a page with a partialview on it which is a list of items. I have a button on it which shows the next 5 items.

This is done via ajax:-

[code]...

My question is that I need the 'page' variable to increment each time someone presses the form button which is contained within the partialview.

How do I keep track of that variable?

View 1 Replies

AJAX :: Passing Property Values From Server To Client In A User Control ?

Aug 13, 2010

I have a user control which has some properties configured on it. I need to access (actually, only read) the values of those properties on the client. I have done it like this.

Code behind:

[Code]....

ASPX:

[Code]....

That works but, at the back of my mind, I'm sure I've seen a neater way of doing it, although I suspect that may have been on an Extender not a User Control. Pointers on that welcome.

Also, related to that, the User Control itself has an Id which becomes part of the name of all visual objects included within it. However, the User Control is not a DOM element in its own right (because it has no visible rendering) which [I think] means that I have to attach properties to one of the visible elements within it, and not to the control itself?

View 2 Replies

MVC :: Passing Data From View Back To Controller

Sep 23, 2010

I have following situation - I am pasing user info object from Controller to View. It contains GUID UserID, which i dont want to be seen on page. So I removed every Html.LabelFor(model => model.UserID), Html.TextBoxFor(model => model.UserID) etc... from generated View source. And because of this when Html.BeginForm() returns that object back to Controller all values is there but UserID is lost??

If I leave Html.LabelFor(model => model.UserID), Html.TextBoxFor(model => model.UserID) etc.. in View everything is fine. But I dont want to show UserID? Where is the problem here?

<%= Html.LabelFor(model => model.C__User_Id) %>

View 6 Replies

Passing Data From View To Controler And Back?

Mar 23, 2011

I am working on an MVC application and I have an index view where I pass model from controller to index view. The index action has no parameters. Now On view I have a jquery calendar. I want to change all the data on view when a date is selected. do I need to use different action method for this as current action method doesn't have parameter. or I can use same ?

View 3 Replies

State Management :: Passing Data Client To Server Using Hidden Field

Mar 26, 2010

I am trying to pass data from client to server using a hidden field. If I use a button, then OnClientClick sets the value, and OnClick does the postback and all is well.

However, I am responding to a Client event, and although this works I get no postback. How do I now force a postback from my client handler?

View 3 Replies

Forms Data Controls :: Loosing Client Input When Navigating Back In Wizard Control?

Mar 29, 2011

I'm using Wizard control to collect some information. I have Repeater control in my Wizard control. when client inputs information and clicks next button he gets to next WizardStep, thou from next step when client clicks previous button and navigates to previous step Repeater control's input fields are empty. How can I store client input so when he will navigate back he could see previously added information. I don't want to use any client or server side session management techniques, because I think viewstate is enough. I think my problem is I don't bind Repeater control in a right place, besides, all the controls inside my Repeater control are loading dynamically.

View 6 Replies

Forms Data Controls :: LinkButton On Repeater Stops Posting Back After Client Side JavaScript Executes?

Dec 31, 2010

I have a repeater that has a LinkButton in the Item Template. The LinkButton displays a UserControl that consists of a FormView. The UserControl has an HTML Element that when clicked hides the UserControl by simply change the display of the control from 'block' to 'none'. If the 'Close' span is clicked, the UserControl is successfully hidden, but afterward, the 'Edit' linkbuttons no longer postback.

View 1 Replies

Web Forms :: Passing A Message Back?

Jun 14, 2010

I've got a page (menu.aspx) that contain a ListView, within the ListView is a user control which is just a GridView of items related to those in the listview. Now the overall page is linked to a master page (Master.admin) that has a simple Literal control that I use to display messages, etc.

What I need to be able to do is if I update, delete, etc something from the Gridview (user control), I would like it to display what ever message I send to the Literal control

I can do it from the actual ListView itself by doing somethihg like ((Master_Admin) Master).Text +=
"My message";

View 2 Replies

MVC Passing Model Together With Files Back To Controller?

Oct 6, 2010

I've been going at this for several hours and I simply cannot find the solution.

I want to get some data from my user. So first, I use a controller to create a view which receives a Model:

[code]...

The rest of this controller does not matter since no matter what I do, the count attribute of Request.Files (or Request.Files.Keys) remains 0. I simply can't find a way to pass the files from the form (the Model passes just fine).

View 2 Replies

Efficient Design - Passing Parameters Back And Fourth?

Apr 21, 2010

I am developing an application that will have 200+ sessions at any given time. I am also relatively new at asp.net development. This application will be hosted on a remote server along with its SQL Server 2008 database. Each session will constantly use SQL select, update, insert, and delete commands. Do you think it would matter if I used server-side logic to perform all the SQL commands, passing parameters back and fourth? Or should I do some more research on client-side database manipulation? Would it be too much load if i used strictly server-side?

View 7 Replies

Web Forms :: Passing Value From Menu Item To Sql In Back Code

Sep 10, 2010

How do I pass the value from my menu item to my sql in the back code? Here's what I have so far.

[Code]....

and I need it passed to the ScheduleID so that it reloads the page with the new value parameter

[Code]....

View 3 Replies

C# - Uploadify - Passing Information Back To The Original Form?

Mar 3, 2010

I have an Send.aspx page that has an uploadify control on it. Upload.ashx handles the file upload.I am adding a file record to a sql database in the Upload.ashx file and I need to get the ID of that record back from Upload.aspx when it is done.Can't get it working with Sessions. =( Something to do with an Adobe bug?

What would the best way to handle this be?Here is the uploadify control:

<script type="text/javascript">
// <![CDATA[
var contestID = $('[id$=HiddenFieldContestID]').val();[code]...

This took a while for me to figure out. But in retrospect it is extremely simple. For this reason, I mad a video tutorial to help newcomers get started quickly and understand how this awesome control works.

Video Tutorial from start to finish:

http://casonclagg.com/articles/6/video-tutorial-uploadify-asp-net-c-sharp.aspx

View 2 Replies

AJAX :: How To Return Back Back To Code Behind File After Cascading Dropdown Calling

Aug 29, 2010

I have a cascading dropdown. After the dropdown is populated(it is in another file) i would like to return back to the original form where the control is placed. is there anyway of doing it

View 4 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

IIS Response Not Reaching Back To Client

Oct 12, 2010

I got a strange issue after hosting the my site in IIS 7.5, Windows server 2008 64 bit

The applicaion is created in ASP.Net 2.0

The page with issue has following workflow:

Upload a file from browser (may be very large size ~50 MB)Perform some process (May take very long time: up to 30 minuits)Notifies the client that process is done.During the process client uses something like http://www.codeproject.com/KB/session/Session_Defibrillator.aspx to keep the session alive.

The Issue:
The client does not get any response sent by my code after the process is over. It should refresh the page with the response provided by my code. But instead it only shows waiting for... in the status bar.

I have tried this on IE and firefox.

To veryfy the process is over

I have added some trance message in my code to check when the process gets finished.I have also checked the Log from IIS, it also shows that response sent with Code 200.

Please help me solving this issue:

What could be the issue?How can I diagnose and fix this problem?In what cases connection between browser and IIS server gets lost.

View 1 Replies

Server Call - Back Specific Client When Something Happens?

Jun 10, 2010

I have a VB.NET ASP.NET webserver program running. One or more VB.NET clients are making use of it. Nothing special so far. As far as I know, the server is not really aware of the clients. Clients can request data. But is it also possible to let the server call-back a specific client when something happens? So that the client doesn't need to poll?


To be more specific, this server is connected with hardware modules. Clients could be terminals that show the status of a sensor for example. When a sensor gives an "alarm" value, it would be nice if the server could pass that alarm towards the clients. Instead of letting the clients to check each X seconds if that alarm is active. Would be a waste of energy, especially because the chance this alarm goes off is almost zero...

View 15 Replies

Sending CSV Created On The Fly Back To Client For Download?

Mar 11, 2011

I'm converting a bunch of FOXPRO / FOXWEB apps to ASP.NET.

The underlying DB is still foxpro (for the moment).

I am passing a table to some VB.NET code that I want to have converted to a CSV file and sent back to the client for download. And it works! Sort of ... It works sometimes, but at other times, instead of asking me if I want to download the CSV file, it just spews the file to the browser window.

On the asp side, I am passing the response object, the table and the csv file name.

[Code]....

View 3 Replies

Web Forms :: Passing Parameter To CustomValidator On Client Side?

Mar 16, 2010

i am using data grids on my web page, and on edititemtemplate i have custom validators for the drop down list ( ddl), most of them they do the same job which is to test if the user did select from the ddl or not.

i want to point all of these drop down lists to the same function and pass to this function the ddl.ClientID

how can i do this?

i tried this but it didn't work with me

[Code]....
[Code]....
[Code]....

View 2 Replies

AJAX :: Passing Data From Iframe To Parent?

Feb 24, 2010

I have default.aspx as the main page and in it I use Greybox to pop and iframe that holds and editable form. Once the user enters in the text and hit submit I need to pass the data to the DB and have it show on default.aspx without refreshing the page. I have the data going to the DB I need with displaying the data on default.aspx page without refresh.

View 4 Replies

Javascript - Client Side Href Lost / Want To Send It Back On Postback?

Dec 30, 2010

I'm losing client side href. Is it possible to send it back to the server on the button submit using a variable or something?

View 1 Replies







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