473,804 Members | 3,320 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

General ASP 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
2 1340
Tom Edelbrok wrote:
I'm reading the section "Postbacks and Round Trips" in the Visual
Studio 2005 Help (I use VB.NET).
There was no way for you to know it (except maybe by browsing through some
of the previous questions before posting yours - always a recommended
practice), but this is a classic asp newsgroup.
While you may be lucky enough to find a dotnet-knowledgeable person here who
can answer your question, you can eliminate the luck factor by posting your
question to a group where those dotnet-knowledgeable people hang out. I
suggest microsoft.publi c.dotnet.framew ork.aspnet.
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.

Look up ViewState in the online help.

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Apr 19 '06 #2
> 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?


When the control is recreated it gets the value from the data sent from the
form.

Controls also store some stuff in ViewState to maintain it across postbacks.
Apr 20 '06 #3

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

Similar topics

15
2017
by: John Salerno | last post by:
After my last post, I thought of another question as a result of the following: ------------------------------ Mike Meyer wrote: > John Salerno <johnjsal@NOSPAMgmail.com> writes: > > >>So my question is, is this feasible? >
3
1482
by: JezB | last post by:
What's the generally accepted approach for using Styles and Stylesheets in a web application based on .aspx files, Web Controls, User Controls, and code-behind modules (c# in my case)? Most style and stylesheet guides on the internet seem to be based on web sites (rather than applications) based on relatively static textual information. I have read that external stylesheet files are the way to go, but it seems to me that these only lend...
2
1434
by: ZorpiedoMan | last post by:
I'm new to the world of sockets, and this question is not VB specific: If multiple clients access the same server on the same port, and the server is set up to do some async communication, does the server's response back to all the clients on that port, or just to the one who sent the request? In other words: Client One - Request Data From Server (It takes a few seconds for the server to get the answer)
105
5365
by: Christoph Zwerschke | last post by:
Sometimes I find myself stumbling over Python issues which have to do with what I perceive as a lack of orthogonality. For instance, I just wanted to use the index() method on a tuple which does not work. It only works on lists and strings, for no obvious reason. Why not on all sequence types? Or, another example, the index() method has start and end parameters for lists and strings. The count() method also has start and end parameters...
1
2376
by: Mark Fink | last post by:
Hi there, unfortunately I am new to Jython and my "Jython Essentials" book is still in the mail. I looked into the Jython API Doc but could not find the information. I am porting a Python library to Jython and some parts are missing. My question basically is where do I find information on what to use instead. E.g. I could not find information on the os module. I do not find the sys module docu either. The concrete problem is I have...
0
1522
by: Yong | last post by:
I'm not getting any reply to my previous thread so I'm stating a new one. I get a General Network Error due to my SqlCommand object not having a big enough CommandTimeout to complete very long sql statements. My question is this: Why does SQL generate a General Network Error instead of the Timeout Expired Error? When I run my program multiple times, there are cases where I'd get the Timeout Expired Error ("The timeout period elapsed...
4
2320
by: Viviana Vc | last post by:
Hi all, I've read the WindowsVistaUACDevReqs.doc documentation and I have done different small tests on Vista to understand the bahaviour and now I have a few questions. 1) If I create a dummy console application that creates a file in Program Files directory, this one will succeed and will create the file b/c of the virtualization. But, if I do the following call in a console window (a.exe contains just
2
4059
by: sharan | last post by:
Hello Friends I have a problem in Data Structure (In C) i want to emplement a General tree having three child nodes of each parent node ...please send me any simple Example( code) by which i can understand General Tree codes.....node be int value if possible than help me for a name(string)
2
168
by: SpotNet | last post by:
Scott M. Have your experiences shown you that programmers may give the best computer advice, analysis, and solutions even at the worst of times, for a PC user? ;~D Haven't crossed many Network Engineers, Network Administrators, System Administrators (there are a few I've crossed that do), that end up knowing an operating system, like Windows as a programmer ends up knowing it. Not giving excuses, maybe just an observation on why they...
3
1625
by: =?Utf-8?B?Ymxi?= | last post by:
I am posting to the general discussion group - but I cannot find my postings... or replies...
0
10558
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10302
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
10069
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9130
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5503
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5636
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4277
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
2
3802
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2975
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.