Asp.net - Asynchronous Postbacks Causing Full Postbacks

Jan 12, 2012

I have an asp.net page within which I've used several AJAX controls doing partial postbacks with update panels. In testing it works wonderfully, all of the postbacks are done without reloading the page and it makes the whole process smooth. I uploaded this to the web server for some outside testing and all of the tested reported that the page was reloading a lot. I tried it within the network from the web server and it was still working fine. However, when I tried it from outside the network at home, it does in fact appear to be doing full postbacks whenever it's set to do partial postbacks for these update panels.

I can't seem to find out why this is happening. Even with the increased time it takes to communicate with the server, it shouldn't reload the page - it should just, at most, stall for a moment. Another strange thing is that it's not maintaining the scroll position even though I have it set to do so for the one or two full postbacks I have. It reloads to the top of the page.

I'm thinking perhaps this may be something set on the server, but I can't be sure.

View 2 Replies


ADVERTISEMENT

Asp.net - SessionID Randomly Changes On Postbacks?

Feb 3, 2011

Our solution is built on ASP.NET v1.1 framework. User is presented with login form, so upon providing credentials this information is posted back to the server. Upon postback SessionID changes and our application crashes as some information which is required for processing is stored in the cache and is identified by SessionID string as a part of the name.

This SessionID change happens absolutely randomly and only to some of the clients. Most of the time browser used to view the page and post info is IE8. I cannot reproduce this issue in our test environment, as SessionID is persistent though-out the whole testing process.

I've already checked all solutions, i.e.

Session cache is used on Page_Load to retrieve/store some information, so it's initialized and contains data stored. I've made a Health Monitoring check on Application_End event to capture any possible AppDomain crashes using Reflection and Diagnostics Libraries and retrieving ShutDownMessage from httpruntime object, but that's also not a case. Cookieless attribute of the sessionState in web.config is set to false (using URL to store SessionID is not an option)

All MS security and bug fixes are installed on the server. IIS Server settings are similar to the ones we use in Test Environment.

View 1 Replies

Asp.net - Persisting GridView Data Across PostBacks?

Apr 4, 2011

Alright, so here's my basic ASP.NET page setup: I've got a page with a GridView that has ContentTemplates in it. You can add a row and edit/remove rows at any time. There's a "New" button that creates a new row.

All of this data is bound to custom data objects. So if I have a GridView of "People" and each row has "FirstName", "LastName", and "Gender" (with TextBox and DropDown controls), I then have a "Person" object which has public properties for "FirstName", "LastName", etc. I have the binding set up correctly, and I can push data into the GridView from the object, and I persist the object with the Session variable. My page lifetime structure looks something like this:

Page_Load: Loads the List(Of Person) from Session()
Any events fire, and modify the List(Of Person).

After any event, the List(Of Person) gets saved back into Session(), and is then DataBound to the GridView (and any subsequent fields are also DataBound, such as the DropDownList.

My question is: Whenever I fill in rows in the GridView, and then add a new row (there is no database saving going on whatsoever), my fields clear out and don't persist across PostBacks. So, how can I persist my custom data objects with databinding across postbacks?

View 2 Replies

Asp.net - Dynamically Add Drop Down Lists And Remember Them Through Postbacks?

Aug 10, 2009

I need to show a drop down list when the page loads, the default selected value is nothing, or an empty element (such as "-"). When the user selects one value from the list, another drop down list is added below the first one, and so on.My problem with this is how you make the page to remember the drop down lists created through postbacks and the values they have selected?

EDIT: I did this example for dynamically add drop down lists and suscribe them to an event handler but the event won't fire.

EDIT 2: Changed the code because I labelled for VB.Net and posted something in C#. I update the code with some trivial improvements, but still won't fire the event :(

Private myDdlArray As New List(Of DropDownList)
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If (Session("ddl") Is Nothing) Then

[code]....

View 4 Replies

C# - Stop PostBacks Showing As Separate Pages?

Jan 10, 2012

I have an ASP.NET form that the user can make lots of changes to, each time they make a change the page PostsBack and the details are updated.If the user hits the browser back button they go back through all the previous versions of the page.Is it possible to stop each PostBack being treated by the browser as a new page?

View 3 Replies

Settting Up Control Properties In Between Postbacks Is Not Working

Apr 16, 2010

I am settting up control propertis on page load. Like visiblilty of control depending on loaded data. And very simple setting up images to button controls. For page load it works fine but on postback these values are not set back. This is my code. When it's a postback btnSecurityQA image is missing and visibility of all following controls is not set accordingly.

If Not IsPostBack Then
ButtonImage.SetPath(btnSecurityQA, GetLocalResourceObject(btnSecurityQA.ID & "BaseName").ToString())

[Code]....

View 1 Replies

Asp.net - Properly Changing Ajax MultiHandle Slider Parameters On Postbacks

Jun 17, 2010

In VS2010 I have VB.NET codebehind aspx pages and I'm using Ajax multihandleslider extensions to filter search results on numerical values.

Fistly, the multihandle sliders don't display in the designer... I have to remove the slider targets tag:

In order to make it display in the designer... this isn't so much a big issue but an annoyance.

I am displaying items in a given category. So I get the max and min prices for all items in that category and assign the sliderextension max/min values appropriately.

This works fine until... I change the item category and go get a new max/min value for the slider control. I set the max/min values, then I set the target textbox values each to the corresponding max/min values.

The slider handles don't repaint (or init?) properly Like say for example my initial min/max is 1/100 if I do a full postback and change the max value to 1000 then the slider bar (correctly) stays the same size but the handle appears WAYYYY to the right off the page and I have to scroll to it. When I click it, it shoots back onto the slider bar.

View 2 Replies

Added A Full Main Menu To Game And A Full Splash Screen

Apr 29, 2011

I have made quite a nice and tidy little game. Its based around space invaders and works quite well. however because i have finished my college project almost 2 weeks ahead of the assignments release date, my tutor has asked me to tweak my project and make it better.So far i have added a full main menu to the game and a full splash screen. I would like to add in a section for recorded high scores but have no idea how to attempt this at all.

View 3 Replies

Asynchronous Callback For TCP?

Aug 17, 2009

I have this code obtaining data from a sensor that is sending a string that contains 4 numbers separated by a tab and terminated by an end of line/ I am trying to use an asynchronous callback to get the data over TCP. That problem is that the callback function is not grabbing the complete string. Sometimes it will, other times it gets half in one retrieve and half in another. I need the callback to hold off until it gets a newline character.

Code:
Public Sub readVaisala()
Dim ip As String = "192.168.1.30"
Dim portNumber As Integer = 23
Dim time As Int32 = Now.Second * 1000 + Now.Millisecond

[code].....

View 2 Replies

Set Up An Asynchronous Web Service In Asp.net?

Feb 18, 2011

How can I set up an asynchronous web service in asp.net?

I want to call a webservice to post some data to a database, but I don't care if the response failed or succeeded.

I can use .net 2.0 or 3.5 only and it can be in vb or c#.

View 3 Replies

Apply Asynchronous Code In VB?

Mar 15, 2009

I have a small VB.NET application built using VS 2008 and .NET 3.5.Very simply, there is a timer that kicks off every few seconds to download an XML stream from the web. I look at this stream and manipulate it.The problem I am facing is that the remote web server may not respond in a timely fashion to the following line of

[code]...

How can I implement asynchronous calls so that the my application can behave without locking up?

View 3 Replies

Asynchronous Programming Using CallBack?

Feb 1, 2010

I have a class with a mthod which does a a time consuming task. I know how to start the method in a separate thread using the Threading.Thread class. What I want to do is use callback so as to have the method report its result to another method when completed. I chose to use the asynchronous Begin/End call pattern.

Private Function BeginConnect(ByVal URl As String, ByVal callback As AsyncCallback, ByVal state As Object) As IAsyncResult
'Some Code
End Function

[code]....

View 13 Replies

Asynchronous Socket Programming?

Feb 23, 2010

i'm creating an Asynchronous socket programming in vb.net. i've utilised the code from Asynchronous client and server code frtom the following links:m a new user so could post only one link fully)When I try to connect the for more than one client the second client always waits until the first clientcompletes the call. i want the clients to accept calls at the same time

View 1 Replies

Asynchronous Web Services Between Different Platforms

Oct 12, 2010

I am writing web services with VB.NET (2.0). The client side will use different technologies such as Java and Siebel. So, if I write asynchronous web services, is it possible for different platforms to consume them? I know it is quite easy with a consumer having .NET platform, but not sure for different platforms. Is it enough for them to have asynchronous ability, or should it be a similar platform?

View 3 Replies

Forms :: Asynchronous HttpWebRequest?

Feb 12, 2010

I noticed that HttpWebRequest freezes the UI while it's waiting for a web page to be downloaded:

[code]

If someone's done this before, what is a good way to keep the application responsive?

View 4 Replies

Why Asynchronous Operation Is Slow

Feb 2, 2012

I am using a BackgroundWorker, an OleDBDataReader, a DataGridView to retrieve records asynchronously from an Access database. I call ProgressChanged event from the DoWork event every time I retrieve a record. In ProgressChanged event I add that record to the DataGridView and also update a label. There are about 2000 records to retrieve.I have two problems:Although I'm running an asynchronous operation, the UI remains unresponsive unless I use Thread.Sleep() inside the DoWork event (Why?). Using Sleep() method with an argument of 1 causes the process to run 20 times slower! (Process takes about 1 second if I comment out the 'Threading.Thread.Sleep(1)' line, compared to 20 seconds if I use it.) What can I do to get a responsive UI and a fast background operation (at least not 20 times slower!)?The other problem I am facing is: if I close the form while the asynchronous operation is ongoing, I get this exception (I think in the ProgressChanged event): Exception has been thrown by the target of an invocation. I tried using FormClosing event to end the process but no luck. How to fix this?

View 5 Replies

.NET Asynchronous Sockets Packets Getting Lost?

Oct 15, 2011

I made a TCP server which communicates with multiple clients at once, but I can't seem to be able to make them stable. When one of the client sends 100 packets to the server, the server receives only a few of them.Here's the client code in PasteBin. It shows how the client connects to the server and then sends 100 messages in a For loop to the server.And here's how the server handles the connection. I couldn't paste the full source as it's hundreds of lines long so let me know if it's missing any mandatory parts and I'll upload them as well.

View 1 Replies

Asynchronous Ftp Client (file Download)?

Jan 9, 2010

I create an automatic ftp file downloader by using FTPwebrequest. In which, is there any possible to download multiple files simultaneously using Asynchrounous and threading concept?

View 1 Replies

Asynchronous To Send/receive From A Website?

Jan 24, 2011

I'm using asynchronous to send/receive from a website I want to block the BeginGetRequestStream method which I have done, using

Code:
WaitEvent.WaitOne(1000 * 20, false);

the problem is that it blocks the UI, which I thought it did not so it basically works like GetRequestStream which does block the UI.

View 3 Replies

Asynchronous Transactions With Xml Https Post

Jun 3, 2011

I basically have a few thousand transactions 7,000 - 10,000 transactions to process over a short time. The flow goes like this.

---> ----> ---> ---> receive (1000) as each transaction takes approx 2 seconds so if i were to process synchronously it would take all night......

Now first i would like to ask if i am going about this the right way ? the service i am communicating with is not .net but is built to handle large amounts of requests. I have obtained the following code that suggests it will do what i am after

dim strxmlreq as string = '(this is where i input my xml string)
Dim request As HttpWebRequest

' Create the request

[CODE]...

The problem i have is if the above will work for me where exactly do i catch the returned xml string ? I assumed "result" would be the xml output string.

View 3 Replies

Download File Asynchronous Using Sockets?

Jun 9, 2011

Download file asynchronous using sockets

View 8 Replies

Forms :: Asynchronous Programming Using CallBack

Feb 1, 2010

I have a class with a mthod which does a a time consuming task. I know how to start the method in a separate thread using the Threading.Thread class. What I want to do is use callback so as to have the method report its result to another method when completed. I chose to use the asynchronous Begin/End call pattern.

My thoughts are:

Private Function BeginConnect(ByVal URl As String, ByVal callback As AsyncCallback, ByVal state As Object) As IAsyncResult
'Some Code

[Code].....

View 4 Replies

Get A Simple ASP.NET Asynchronous Callback To Web Service?

Feb 12, 2011

I have been trying to figure this our for far too long and I cannot get my head around it. Every example I have seen seems to be far more complex that I need. I have a web service in my project (.asmx). I want to call it very simply from a button on a webpage.

Click
Run service asynchronously
return control back to webpage (web
service running in background)

View 1 Replies

Make A Multiple Asynchronous Calls Using .NET?

Jul 12, 2011

The scenario is that an ASP.NET webforms page will call a web service in an async manner to make about 8 web service calls to various providers for data. I would like to run them in parallel to speed things up. I also need to wait for them all to come back before moving on.

View 1 Replies

Make An Asynchronous Call To A Method?

Jun 16, 2010

I need to make an asynchronous call to a method which for the sake of simplicity counts from 1 to 100. If an exception is thrown during the methods counting process, lets say at 50 I need to stop the methods execution, dispose of a few objects and restart it at 51 but have no idea how to go about it.I basically need to raise an event from the method to the main thread and restart the asynchrounous method.

View 3 Replies

Multithreading And Asynchronous Event Raising

Jan 17, 2012

I am developing a form application in VB .Net with a main thread and two other threads that reading values from two serial ports, do some work and raising events to return values when each thread ends.The handlers for the events are in my main thread.Is there any possibility the two threads to raise events the same time or some other event (button click event for example) raised the same time with a thread finished event? What happened then? Is there a way to make asynchronous event raising?

View 11 Replies

VS 2008 Closing The Asynchronous Socket?

Feb 6, 2011

I have closed the client socket using client.close() but netstat command shows the same socket in time-wait state.Because of this I am unable to reuse the socket..

View 2 Replies

Abort An Asynchronous Method Call After Timeout?

Oct 6, 2010

VB.NET 2010, .NET 4/I have a System.Timers.Timer object that does some work on its elapsed event:

Private Sub MasterTimer_Elapsed(ByVal sender As Object, ByVal e As System.Timers.ElapsedEventArgs) Handles MasterTimer.Elapsed
MasterTimer.Enabled = False
'...work...
MasterTimer.Enabled = True
End Sub

My problem is that the work that it's doing sometimes gets stuck. Part of the work is serial communication so it might be getting stuck waiting for a response from something. I've already modified my serial communication code a bit to hopefully solve the problem. However, this timer is basically the heartbeat of a production control application and it is very bad if it were to stop for any reason. I was thinking that it might be nice to put in a fail-safe timeout so that, if the "work" is taking too long, the timer could re-enable itself and try again. I was thinking of something like this:Move the work into a subroutine and create a delegate:

Private Delegate Sub WorkDelegate()
Private Sub Work()
'...work...
End Sub

Call the work by invoking the delegate and then use WaitOne(timeout) on the IAsyncResult to specify a timeout:

Private Sub MasterTimer_Elapsed(ByVal sender As Object, ByVal e As System.Timers.ElapsedEventArgs) Handles MasterTimer.Elapsed
MasterTimer.Enabled = False
Dim workDel as New WorkDelegate(AddressOf Work)

[code]....

In that it would re-enter a subroutine that is already running? Is there a way to abort Work() if it hasn't finished after the timeout? In other words, just cease execution of Work() if result.IsCompleted Is False after WaitOne?

View 1 Replies

Asynchronous Socket Library Not Updating Form

Nov 23, 2011

I am attempted to write a small asynchronous socket library that I can use to create a client/server application. I can get all of the code to run fine if I leave it in the form, however if I try to move it out into its own class, I cannot figure out how to update the form with connection status, things like that. Below is code, shortened a bit just to make this easier to read and type.

[Code]....

There is actually more to that class, but I never get anything after the first message goes out. I'm not sure where to go from here. I've tried lots of different methods that I've found on the google searches, some from here, some not.

View 1 Replies

Asynchronous TCPClient (Stream / SslStream/NetworkStream)

Dec 2, 2010

I'm using the code at the bottom to connect to a Usenet newsserver. This code works fine, but it freezes the UI, so I need to do it asynchronously.

[Code]...

View 6 Replies







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