473,569 Members | 2,698 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

loading data without a page refresh

20 New Member
hi all,
I am developing a web application related to the share market, what i want to accomplish is that i want to present the user share market data that will be updated every 40 seconds. but i dont want a page refresh do do that, i wanna do it the way it happens on say facebook, in which the page is updated with new contents without refreshing the page.

somebody suggested me to use AJAX to do so. can anyone give me a starting point to achieve that, may be through ajax or something else. a simple example will be highly appreciated.

a big thanks in advance..

Ather
Mar 22 '10 #1
2 5481
CroCrew
564 Recognized Expert Contributor
Hello athar258,

You can’t get away from some type of call back to the web server. I understand that you don’t want to refresh the entire page every 40 seconds too.

With that said… </ cough> AJAX UpdatePanel control </ cough>

Happy Coding,
CroCrew~
Mar 24 '10 #2
Frinavale
9,735 Recognized Expert Moderator Expert
I hate it when people say "I want my page to be updated with the most current information stored on the server but I don't want to make a request to the server".

It is impossible to get the data from the server if you don't ask the server for the data!

Ajax is made simple for ASP.NET developers.
Microsoft has created something called an UpdatePanel that helps you with this....so you pretty much don't have to learn Ajax in order to to perform an Asynchronous postback to the server.

This is how it works.

Anything in the UpdatePanel will cause an asynchronous postback to the server. So if you have a Button and a Label within the UpdatePanel and a bunch of content outside of the UpdatePanel...a nd the the user clicks the Button, only the portion of the page with the Button and the Label will be refreshed.

Please note that the whole page is sent to the page but when the request returns to the browser it is stripped down so that only the content within the UpdatePanel is sent back.

This means that you will have access to the controls outside of the UpdatePanel in your server side code....BUT...t hey will not be updated if you try to update them in an asynchronous postback.

So, my suggestion is that you place whatever you want to "refresh without posting back" in side an UpdatePanel so that you can postback without the user noticing.

Look up UpdatePanels.

-Frinny
Mar 25 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
1635
by: Darren Line | last post by:
Could someone kindly point me the direction of some sample script or tutorial that will enable me auto populate fields on a page. By this I mean, I have a page with address fields on it, they click on a button to bring up a popup which displays a list of addresses, when they choose one, the popup closes and the address they have chosen is...
5
5363
by: judiphuongtu | last post by:
I am trying to create an input form with a pull-down menu that allows a user to add an item to the pull-down. I don't want the page to refresh when I refresh the pull-down since there's entries on the form already. Please help! Thanks. jptu
2
5821
by: Arielle | last post by:
I've argued with this for quite some time and I've seen a number of other people on various other sites asking for this same thing with no answer so I figured that now that I have solved it I would share it. It could probably use some tweaking but anyway feel free to use this code as you see fit. The idea is that you have a dropdown, and...
1
1411
by: PerumalSamy | last post by:
Hi, I had created asp.net page with checkbox control. I set autopostback property as true and i wrote codings inside checked changed of that checkbox to do some process . In runtime, while i clicking the checkbox the page is getting refresh. Any idea for executing checked changed codings without refreshing the page.
1
1961
by: lakshmishri | last post by:
hi all can anyone answer this ?? i have developed a module which displays cricket score card and this is one of the part in a HTML page along with other modules. now this module alone must be refreshed at regular intervals without refreshing the page. this has to implemented using javascript can anyone help me out ??
8
4505
by: m1post | last post by:
Hi, I'm very much a novice, and wondered if someone could help. I'll try to be as specific as possible, but don't waant you to have to read too much. I have 2 pages in the sequence. 1st allows customers to login, passing control to the 2nd, which on entry returns their balance details from my DB (using their Reference 'BookingRef =...
5
4588
onlymars
by: onlymars | last post by:
helloo guys, i have an image gallery page which have thumbnails at the bottom of the screen and the main image is in the middle of the page, i want that users click on the thumbnail pic's and the main image changes accordingly but with out a page refresh. have searched a lot but am not getting a solution, your help will be very appreciated....
45
6832
by: angelicdevil | last post by:
i have 2 tables 1 is status_type with field name status and other is users with field username and status now i want that the first listbox lists all status from status type ( this i have achieved with php ) and based on selection of the value in listbox 1 the corresponding data in table users be loaded in listbox 2 . i have achieved...
1
2530
by: rahullko05 | last post by:
one line code to replace an image without page refresh
0
7697
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7612
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8120
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7672
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7968
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6283
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5512
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3640
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.