473,797 Members | 3,152 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

transferring data to different page

hi guys I don't know if this is the right place for it but
I created 2 pages
in page one there is a text box in which the user enters his name,
in page 2 there is a the same text box.
I would like the data to be transferred automatically to the second page
how do I do that ?
thanks

Nov 19 '05 #1
2 1551
yes, it's the right place..and how is the user getting from page one to page
2? is he or she clicking on a link or a button?

There are a couple ways, but none are automatic...you need to grab the data
on the postback to page 1 and redirect/transfer to page 2..

private void Button1_Click(o bject sender, System.EventArg s e)
{
Response.Redire ct("page2.aspx? value=" + textbox.Text);
}

or using Context.Items and Server.Transfer
and in page2 you get the value and populate the other textbox

Page_Load
TextBox.Text = Request.QuerySt ring["value"];
end
the above is pretty crappy code (no error check and stuff), but not 100%
sure what mechanism you already have in place...

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"Rani" <ra***@hotmail. com> wrote in message
news:uZ******** ******@TK2MSFTN GP09.phx.gbl...
hi guys I don't know if this is the right place for it but
I created 2 pages
in page one there is a text box in which the user enters his name,
in page 2 there is a the same text box.
I would like the data to be transferred automatically to the second page
how do I do that ?
thanks

Nov 19 '05 #2
Here's a nice, simple way to pass values from one page to another:
(VB.NET code)

'Add data to the context object before transferring
Context.Items(" myParameter") = x
Server.Transfer ("WebForm2.aspx ")

Then, in WebForm2.aspx:

'Grab data from the context property
Dim x as Integer = CType(Context.I tems("myParamet er"),Integer)

Of course there are a number of ways to pass values from one page to
another, such as using the querystring, cookies, session,
context, saving to a temporary table in the database between each page, etc.
You'll have to decide which technique is best for your application.
Here are several good articles on the subject to help you decide.
http://msdn.microsoft.com/msdnmag/is...e/default.aspx

http://www.aspalliance.com/kenc/passval.aspx

http://www.dotnetbips.com/displayarticle.aspx?id=79

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Rani" <ra***@hotmail. com> wrote in message
news:uZ******** ******@TK2MSFTN GP09.phx.gbl...
hi guys I don't know if this is the right place for it but
I created 2 pages
in page one there is a text box in which the user enters his name,
in page 2 there is a the same text box.
I would like the data to be transferred automatically to the second page
how do I do that ?
thanks

Nov 19 '05 #3

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

Similar topics

9
1468
by: Mark | last post by:
This may be a dumb question but can you tranfer variables stored in a PHP page on one server to a page on a different server via a form POST and be able to access those variables on the new page using Perl? From my understanding of HTTP I can't see why this should be a problem but it does not seem to work at the moment although I am sure it is not a scripting error at this stage (Any newbie-level explanations welcomed!!) Thanks
1
1619
by: r_burgess | last post by:
I am looking for some guidance on transferring data between two pages in my ASP.net Web app (intranet). I have a form that will have a button and a text box on it (among other controls of course) When I click the button, I want to open a contacts page which is already built and functional. From there I want the user to select a contact (using the search and browse tools on that page) When the user selects one of the contacts, I want the...
2
4549
by: jimb | last post by:
I need some advice on how to securely transfer data between two servers. Here is the situation. We have two sql servers that hold student data. I have full access to my sql server, but only write access to the main sql server on campus. I hope to use XML and SSL to transfer student data to the main server. As for generating the XML, I'll have an asp.net page set up in a secure directory that will generate the data in xml format. The...
15
5088
by: http://www.visual-basic-data-mining.net/forum | last post by:
Does anyone have any idea how to transferring data from TextBox1 in form1 to textBox2 in form2..... That means after i fill in any data in textBox1 and click Next button... It will bring me to form2....and there the data that i key in form1 will appear to form2 in textbox2 Thanks
3
1686
by: JayD | last post by:
(Not sure whether it is a general aspnet problem or a specific security problem, hence posting it in 2 groups). This will solve for us a number of problems. I have developed a website on my local machine (part of a LAN) using Visual Web Developer, with ASP.NET 2.0. Backend is a SQL Server 2000 database. All queries and webforms work beautifully on my local machine (file system web project). However, when I copy this website to a...
2
4292
by: neilr | last post by:
Can anyone help with some problkems that have wasted 2 days of my (inexperienced) time already? We have a website which allows people to register for events like conferences We are importing a table of fees for the apporpriate event using an Sp: FeesDataSet = New System.Data.DataSet Dim MySPcommand As New System.Data.SqlClient.SqlCommand MySPcommand.CommandText = "SP4105201getWebFeeTable"
5
3304
by: meetalps | last post by:
Hi All, Can you please help me with a step by step procedure to transfer files from my PC to DB2-AIX and vice versa. I am new to both. Example transferring a sql file to run from PC to DB2 on AIX. PC-OS windows DB2 on AIX platform. Thanks.
2
1843
by: cbs81 | last post by:
hi all, problem: transferring data from workbooks that are stored in a particular directory from excel to a table in access. when done, the workbooks that have been processed are automatically moved into a directory named “processed” . all using vba. this is the pretty complex vb problem that i need some expert solution to. overview. i have created a cash reconciliation application in excel saved by month for each of my bus...
2
2732
hsriat
by: hsriat | last post by:
I have a page working on Ajax. The problem is, after doing many changes using Ajax (like uploading, changing name, adding to favorites etc), the status bar starts behaving unexpectedly. Even when nothing is being transfered, it displays Transferring data from localhost... and that too continuously. The progress bar also shows that its working, and its all green (filled). It doesn't even occur on a particular action. Its just random. This is...
0
9685
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
10469
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
10246
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
10209
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
10023
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
9066
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
4135
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
3750
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2934
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.