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

Home Posts Topics Members FAQ

Passing values between forms

(Type your message here)
Hi
I'm new to asp.net and I need some help
I have three forms with some textboxes.I want to pass the values of the textboxes of form1 and form2 to the third form
For this I'm using in the first form
System.Web.Http Context.Current .Server.Transfe r("secondform.a spx")
also a get function for returning the values of textbox
In the second form
rp1 = CType(context.C urrent.Handler, firstform)
RegisterHiddenF ield("txtpjcode ", Request("txtpjc ode"))
similarly for the second form
But When I run this I can't retrive any values of previous forms

--------------------------------
From: Mani P.S

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>vrL66fQqLUe 3kVkG/raHIA==</Id>
Nov 19 '05 #1
2 1786
Hi,

see this in MSDN
http://msdn.microsoft.com/library/de...formspages.asp

HTH
Regards

Joyjit

"Mani P.S via .NET 247" <an*******@dotn et247.com> wrote in message
news:u1******** ******@TK2MSFTN GP14.phx.gbl...
(Type your message here)
Hi
I'm new to asp.net and I need some help
I have three forms with some textboxes.I want to pass the values of the textboxes of form1 and form2 to the third form For this I'm using in the first form
System.Web.Http Context.Current .Server.Transfe r("secondform.a spx")
also a get function for returning the values of textbox
In the second form
rp1 = CType(context.C urrent.Handler, firstform)
RegisterHiddenF ield("txtpjcode ", Request("txtpjc ode"))
similarly for the second form
But When I run this I can't retrive any values of previous forms

--------------------------------
From: Mani P.S

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>vrL66fQqLUe 3kVkG/raHIA==</Id>

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
"Mani P.S via .NET 247" <an*******@dotn et247.com> wrote in message
news:u1******** ******@TK2MSFTN GP14.phx.gbl...
(Type your message here)
Hi
I'm new to asp.net and I need some help
I have three forms with some textboxes.I want to pass the values of the
textboxes of form1 and form2 to the third form
For this I'm using in the first form
System.Web.Http Context.Current .Server.Transfe r("secondform.a spx")
also a get function for returning the values of textbox
In the second form
rp1 = CType(context.C urrent.Handler, firstform)
RegisterHiddenF ield("txtpjcode ", Request("txtpjc ode"))
similarly for the second form
But When I run this I can't retrive any values of previous forms

--------------------------------
From: Mani P.S

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>vrL66fQqLUe 3kVkG/raHIA==</Id>

Nov 19 '05 #3

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

Similar topics

4
3143
by: rick | last post by:
Does anyone having a working example of passing values between web forms pages? I tried the example in the ms- help but I can't get by the following: To read property values from the source page in the call page. 1. Create a global instance varible that is typed to the class of the source page. the sample provided
8
4416
by: Johnny | last post by:
I'm a rookie at C# and OO so please don't laugh! I have a form (fclsTaxCalculator) that contains a text box (tboxZipCode) containing a zip code. The user can enter a zip code in the text box and click a button to determine whether the zip code is unique. If the zip code is not unique, another form/dialog is displayed (fclsLookup) - lookup form/dialog. The zip code is passed to the lookup form/dialog by reference. I then load a...
0
2256
by: Neelima Godugu | last post by:
Hi All, I have developed a windows forms user control, which I am going to host in Internet Explorer.. I am familiar with the security settings requirement inorder to do the above. I have successfully gotten it working. The only problem I have is with passing parameters to the Windows Forms User control from IE I am using the Object tag to instantiate the IE object I am using param tags inside object tag to pass paramaters but the...
1
1919
by: Dave Harris | last post by:
I am a raw newbie to VB.NET trying to convert a data processing QuickBasic program into .NET. I have about 14 forms, the first of which has a bank of radio buttons identifying the airline. The second bank of radio buttons identifies the aircraft model, and the third bank of radio buttons lets the user choose between two processes. I am using public properties to get and set the values for these three sets of radio buttons. Once these values...
2
3639
by: o1j2m3 | last post by:
I created 2 forms, A and B using VB.NET 2003 in A, the codes are : ========================== public AsName as string public AsPrice as double public sub setValue(ByVal sname as string, ByVal price as double) AsName = sname AsPrice = price
13
2524
by: Deano | last post by:
Apparently you can only do this with one value i.e Call MyAssetLocationZoom(Me!txtLocation, "Amend data") This runs; Public Sub MyAssetLocationZoom(ctl As Control, formName As String) On Error GoTo err_zoom strFormName = formName
3
2107
by: Ross McLean | last post by:
Hi all, I've been teaching myself C# for a new project at work. I have a bit of a background in c++ and java but never been what you could call a guru. I'm having some strange things happening when I pass a class as a parameter to a Windows Form. Basically, I have a class that has several fields, two of these fields are an instance of an inner class, the rest are basic value types (bool's in this case). I have a windows form, the...
6
1955
by: olsongt | last post by:
I have a C# problem I've been struggling with for a week now. I can't figure it out. I've made a sample application to demonstrate my problem: how do I pass data between forms? I've read tons of posts/articles etc. about doing this, but I cant make it work. The application I'm writing has a bunch of forms, so when I'm done with one, I'd like to close it to free resources. On the close button event on these forms, I'd like to update...
3
6468
by: vidhyapriya | last post by:
Hi all I am developing windows application using vb.net.I want to pass values to open form.I am opening only one form when user click the buttons several times.Useing delegate i am passing values for first time.Next time when user click the button i want to pass value to open form.How to pass value to open form.Can anyone help me plz.Thanx in advance Code I used, Form1 Code: Public Delegate Sub GreetingDelegate(ByVal MsgString As...
0
9706
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
9582
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10335
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
10323
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
10082
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...
1
7621
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
5525
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
5652
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3821
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.