473,769 Members | 1,959 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Data transfering with few WebForms

Hi!

I have a little problem an qeustion.

In .NET Windows Forms I can do something like that:
- i have forms - Form1 Form2, on first form i have TextBox1 control on 2nd
form I have Button1 control
- on second Form i can acces data from Form1 like that:

for example: MessageBox.Show (Form1.TextBox1 .Text);

That's simply and logical.

But Can i do something like that in WebForms?

I have problems with transfering data between to WebForms (2 *.aspx pages) -
i can't have acces to WebForm2.TextBo x1 (example) from any method
implemented in WebForm1 - namespace is the same and that is not so logical
for me. That way of transferig data could be very easy to use and useful but
i don't know is that possible? And if is in what way?

Of course i can use Page.FORM collection but this is not so easy.

If you can write me how i would acces control from one page on the other i
will be very thankfull :)

I have programmed a lot in PHP, Java and asp.net is something totally new
for me.

ps. Sorry for not sa good english :)

--
Pozdrawiam serdecznie!

--
Piotr Karwatka
-- pi************@ aktywni.pl, pi***@amigo.pop .pl
-- http://amigo.pop.pl
Nov 18 '05 #1
2 1509
Hi Piotr,
- on second Form i can acces data from Form1 like that:

for example: MessageBox.Show (Form1.TextBox1 .Text);

That's simply and logical.
Not as simple and logical as you think. The only way that one Windows Form
can "see" data in another Windows Form is if they are both memory-resident
in the same application at the same time. If they are 2 disconnected Windows
Forms executables, they must message each other via the OS or network.

A web application runs in HTTP context, which means that while the web
application memory is shared among all pages (WebForms), the pages
themselves don't co-exists in the same memory space at the same time. A
WebForm exists from the time an HTTP Request is received until the time that
the Response is sent. This means that WebForms must communicate in the same
way that separate Windows Form processes must communicate: via the server or
network.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"Piotr Karwatka" <pi************ @amigo.pop.pl> wrote in message
news:cl******** **@nemesis.news .tpi.pl... Hi!

I have a little problem an qeustion.

In .NET Windows Forms I can do something like that:
- i have forms - Form1 Form2, on first form i have TextBox1 control on 2nd
form I have Button1 control
- on second Form i can acces data from Form1 like that:

for example: MessageBox.Show (Form1.TextBox1 .Text);

That's simply and logical.

But Can i do something like that in WebForms?

I have problems with transfering data between to WebForms (2 *.aspx pages) - i can't have acces to WebForm2.TextBo x1 (example) from any method
implemented in WebForm1 - namespace is the same and that is not so logical
for me. That way of transferig data could be very easy to use and useful but i don't know is that possible? And if is in what way?

Of course i can use Page.FORM collection but this is not so easy.

If you can write me how i would acces control from one page on the other i
will be very thankfull :)

I have programmed a lot in PHP, Java and asp.net is something totally new
for me.

ps. Sorry for not sa good english :)

--
Pozdrawiam serdecznie!

--
Piotr Karwatka
-- pi************@ aktywni.pl, pi***@amigo.pop .pl
-- http://amigo.pop.pl

Nov 18 '05 #2
You probably want to look at something like server.transfer which will allow
you to pass information between webforms. alternatively look at the caching,
session, state options available in asp.net

"Piotr Karwatka" wrote:
Hi!

I have a little problem an qeustion.

In .NET Windows Forms I can do something like that:
- i have forms - Form1 Form2, on first form i have TextBox1 control on 2nd
form I have Button1 control
- on second Form i can acces data from Form1 like that:

for example: MessageBox.Show (Form1.TextBox1 .Text);

That's simply and logical.

But Can i do something like that in WebForms?

I have problems with transfering data between to WebForms (2 *.aspx pages) -
i can't have acces to WebForm2.TextBo x1 (example) from any method
implemented in WebForm1 - namespace is the same and that is not so logical
for me. That way of transferig data could be very easy to use and useful but
i don't know is that possible? And if is in what way?

Of course i can use Page.FORM collection but this is not so easy.

If you can write me how i would acces control from one page on the other i
will be very thankfull :)

I have programmed a lot in PHP, Java and asp.net is something totally new
for me.

ps. Sorry for not sa good english :)

--
Pozdrawiam serdecznie!

--
Piotr Karwatka
-- pi************@ aktywni.pl, pi***@amigo.pop .pl
-- http://amigo.pop.pl

Nov 18 '05 #3

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

Similar topics

2
595
by: Niyazi | last post by:
Hi, I have BIG question and I gues it is the BEST question. I have a problem that I am guessing the best solution is to create some sort ..NET Services. This Service(s) must check every hour the data that reside on AS400 and transfer into the SQL Server. Services also have to be run in between 8:00 AM and 5:00 PM
2
1961
by: bernardpace | last post by:
Hi, I am writing a client server application using TcpClient and TcpListener classes. Now I need to transfer structured large amounts of data. I was thinking to transfer the data in an xml file, so that both on the server and on the client side it would be easy to parse the data. Now if I use the xml file, should the xml file be saved locally? Also
3
1276
by: Netserver | last post by:
Hi have a question hope there is a simple answer. I want to enter data in to 2 arrays from several webforms in project and be able to recall that data from any of the webforms, other then using a querystring I tried creating a module as follows Module dataspecs Public ar1(0) As Integer Public ar2(0) As Integer End Module
7
1128
by: Alphonse Giambrone | last post by:
I am not sure if these are the correct groups to post this, so please redirect me if there are better ones. Client has a SQL Server db of organizations and member info that is in pretty much constant use at his location. He would like to make the maintenance of adding/editing member info available on the web. Since the data contains personal info the web app (built in ASP.NET) will use SSL. The unique identifier for a member is the...
4
1734
by: Jakob Lithner | last post by:
I just read an interesting article on Data Sources in Visual Studio 2005: http://msdn.microsoft.com/vbasic/default.aspx?pull=/library/en-us/dnvs05/html/newdtastvs05.asp It was an eye opener on the new way of filling data into datasets! The article says it is the same idea for WebForms as for WinForms. But when I try to apply the same idea on a new Web project I get a bit confused. My impression is that there are several differences,...
13
2731
by: hexagram | last post by:
hi guys can anybody can teach me how to do this scenario Transfering Data of a form to a new form The Scenario is: I have a Delivery Receipt Form (Hardware) with a fields of the following - id - Formatted as "DR-00000" - company - address
10
3088
by: Martin Hughes | last post by:
Hi guys, I was wondering if anyone could give me some advice. I am looking to develop an ASP.NET application that will enable several workstations to access real time telemetry data received from a vehicle on a track. The data flow would be as follows: |-- Workstation 1
0
1573
nomad
by: nomad | last post by:
Hello Everyone: I need some help with transfering a db from my computer to the host. I'm not to sure how to do this so that the webpage know where the db is at. Here is what I have... I'm using XAMPP to created my db here is the path were the db is at C:\Program Files\xampp\mysql\data I'm using Dreamweaver to create my site. Here is the path where all the files are at C:\Documents and Settings\abc\My Documents\abc\
0
1623
by: Ro | last post by:
I've been given the task of transfering data from an access db to sql server 2000. The previous access db was not structured very well so we reconstructed the tables in sql server 2000 to add better table structure and more functionality. What I want to be able to do is transfer the actual data in the access tables to the new tables in the sql server 2000 db. Does anyone know of a simple way to do this? I've been looking into CA...
0
9579
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10205
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...
0
10035
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9984
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
9851
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
8863
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...
1
7401
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5293
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
5441
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.