473,404 Members | 2,137 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

General POSTBACK question

I'm reading the section "Postbacks and Round Trips" in the Visual Studio
2005 Help (I use VB.NET). Amongst other things, it says that as a result of
a postback "On the Web server, the page runs again. The information that the
user typed or selected is available to the page."

I can set this up in a test project and see that it occurs ... ie: my text
boxes retain their data (ie: "Hello world") even when a postback occurs on
the same or another server control.

If as a result of a postback the web page gets re-rendered at the server,
then how does the text in my textbox (or data in any other sort of server
control) get maintained? I would have thought that if the web-page gets
rebuilt from scratch, any data in controls would be lost.

Can someone explain how this works?

Thanks,

Tom Edelbrok


Apr 19 '06 #1
3 1189

The page is posted back to itself.

Tom Edelbrok wrote:
I'm reading the section "Postbacks and Round Trips" in the Visual Studio
2005 Help (I use VB.NET). Amongst other things, it says that as a result of
a postback "On the Web server, the page runs again. The information that the
user typed or selected is available to the page."

I can set this up in a test project and see that it occurs ... ie: my text
boxes retain their data (ie: "Hello world") even when a postback occurs on
the same or another server control.

If as a result of a postback the web page gets re-rendered at the server,
then how does the text in my textbox (or data in any other sort of server
control) get maintained? I would have thought that if the web-page gets
rebuilt from scratch, any data in controls would be lost.

Can someone explain how this works?

Thanks,

Tom Edelbrok

Apr 19 '06 #2
When you click a button that is markded as runat=server it causes a
http postback passing the state of all controls back to the server.

The same occurs when you place a normal html button with a type
attribute of 'submit' within a form on a standard html page.

Apr 19 '06 #3
By design fields values are posted to the server. The page can then get
those values to populate the controls...

--

"Tom Edelbrok" <an*******@anonymous.com> a écrit dans le message de news:
4It1g.13$fL.2@edtnps90...
I'm reading the section "Postbacks and Round Trips" in the Visual Studio
2005 Help (I use VB.NET). Amongst other things, it says that as a result
of
a postback "On the Web server, the page runs again. The information that
the
user typed or selected is available to the page."

I can set this up in a test project and see that it occurs ... ie: my text
boxes retain their data (ie: "Hello world") even when a postback occurs on
the same or another server control.

If as a result of a postback the web page gets re-rendered at the server,
then how does the text in my textbox (or data in any other sort of server
control) get maintained? I would have thought that if the web-page gets
rebuilt from scratch, any data in controls would be lost.

Can someone explain how this works?

Thanks,

Tom Edelbrok

Apr 20 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: JollyK | last post by:
Hi friends, This is my question.... From the Page Load event (or Page Init event), I would need to find which event had occurred that caused a PostBack, for example was it a event fired from...
5
by: Matthew Louden | last post by:
I created simple ASP.NET web application to test how AutoPostBack property in a web control works. I set AutoPostBack property to be true of a web control. When I run the application, here's the...
6
by: David | last post by:
I am running into situtations where confining all forms to just one window (instance of broswer) is becoming overly restrictive. Does ASP.NET provide ways to have multiple windows to interact with...
9
by: Robert Galvin | last post by:
Is it possible to tell which control caused a postback?
2
by: djc | last post by:
On the page_load event I am querying a database and binding data to some text boxes, list boxes, and a repeater control. When the page loads it uses the value of one of the database fields (status)...
21
by: Martin Eyles | last post by:
I am trying to get javascript to cause a page to post back. I have tried calling _doPostBack from my script, but generates an error "object expected". I think this is because the page's script...
2
by: Tom Edelbrok | last post by:
I'm reading the section "Postbacks and Round Trips" in the Visual Studio 2005 Help (I use VB.NET). Amongst other things, it says that as a result of a postback "On the Web server, the page runs...
2
by: brad | last post by:
Group, I'm using Visual Studio 2003 to create an ASP.NET 1.1 project which contains nested server user controls in order to create a tree-like hierarchy. The tree is a sort of question and...
4
by: Peter | last post by:
ASP.NET I have an application which use ASP.NET Autocomplete extender which works great. But I have a question how to update all the fields on the screen using Ajax. Users starts typing in a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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...
0
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...

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.