473,796 Members | 2,520 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Passing Variables between Webforms

I have 2 webforms (WebForm1 & Webform2)

I have a button on webform1 that when I click it I need to pass some
variables to webform2 and then Popup webform2 and show the variables I
passed.

Any idea how can I do this.
If possible give a short example

Thanks
Ivan Sammut
Nov 15 '05 #1
3 1631
protected void buttonOne_Click (object sender, EventArgs e) {

Response.Redire ct("webform2.as px?fld=value&.. .....");

}

HTH

sam

"Ivan Sammut" <sa*****@hotmai l.com> wrote in message
news:ey******** ******@TK2MSFTN GP09.phx.gbl...
I have 2 webforms (WebForm1 & Webform2)

I have a button on webform1 that when I click it I need to pass some
variables to webform2 and then Popup webform2 and show the variables I
passed.

Any idea how can I do this.
If possible give a short example

Thanks
Ivan Sammut

Nov 15 '05 #2
Now on webform2 howo do i get the variables out.\

Sorry but I'm still a rookie
Thanks
Ivan Sammut

"sam martin" <sa*********@ya hoo.co.uk> wrote in message
news:uK******** ******@TK2MSFTN GP09.phx.gbl...
protected void buttonOne_Click (object sender, EventArgs e) {

Response.Redire ct("webform2.as px?fld=value&.. .....");

}

HTH

sam

"Ivan Sammut" <sa*****@hotmai l.com> wrote in message
news:ey******** ******@TK2MSFTN GP09.phx.gbl...
I have 2 webforms (WebForm1 & Webform2)

I have a button on webform1 that when I click it I need to pass some
variables to webform2 and then Popup webform2 and show the variables I
passed.

Any idea how can I do this.
If possible give a short example

Thanks
Ivan Sammut


Nov 15 '05 #3
Request[fieldname]..

e.g.

Response.Redire ct("WebForm2.as px?name=Sam");
in Page_Load of Webform2

string name = Convert.ToStrin g(Request["name"]); // or
Request["name"].ToString();

HTH

Sam
"Ivan Sammut" <sa*****@hotmai l.com> wrote in message
news:ee******** ******@TK2MSFTN GP10.phx.gbl...
Now on webform2 howo do i get the variables out.\

Sorry but I'm still a rookie
Thanks
Ivan Sammut

"sam martin" <sa*********@ya hoo.co.uk> wrote in message
news:uK******** ******@TK2MSFTN GP09.phx.gbl...
protected void buttonOne_Click (object sender, EventArgs e) {

Response.Redire ct("webform2.as px?fld=value&.. .....");

}

HTH

sam

"Ivan Sammut" <sa*****@hotmai l.com> wrote in message
news:ey******** ******@TK2MSFTN GP09.phx.gbl...
I have 2 webforms (WebForm1 & Webform2)

I have a button on webform1 that when I click it I need to pass some
variables to webform2 and then Popup webform2 and show the variables I
passed.

Any idea how can I do this.
If possible give a short example

Thanks
Ivan Sammut



Nov 15 '05 #4

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

Similar topics

3
14954
by: domeceo | last post by:
can anyone tell me why I cannot pass values in a setTimeout function whenever I use this function it says "menu is undefined" after th alert. function imgOff(menu, num) { if (document.images) { document.images.src = eval("mt" +menu+ ".src") } alert("imgOff_hidemenu"); hideMenu=setTimeout('Hide(menu,num)',500);
6
364
by: Newbie | last post by:
How do I pass string values from one webform to another?
6
3259
by: Scott Zabolotzky | last post by:
I'm trying to pass a custom object back and forth between forms. This custom object is pulled into the app using an external reference to an assembly DLL that was given to me by a co-worker. A query-string flag is used to indicate to the page whether it should instantiate a new instance of the object or access an existing instance from the calling page. On the both pages I have a property of the page which is an instance of this custom...
2
1416
by: Jeremy | last post by:
How do I pass class object references between ASP.NET webforms ?
5
1850
by: francois | last post by:
I would like to pass information between ASPX pages. For now, my navigation are hardcoded links. In some case I do a Response.Redirect("pages.aspx") Now I wonder is this is a good way to do. For exemple when I log out of my website, i go back to the logon page but I would like to write on the logon page something like "you succesfully logged out".
1
1203
by: Aitham alama | last post by:
Hi There, My question is as following, I have a webform (Webform1) which contains one label control and command button, when the user clicks the button another webform (Webform2) appears, webform2 contains only one control which is the Calendar control, I want to do the following 1- when the user selects a date from the webforms, I want the value
3
3938
by: Mantorok | last post by:
Hi all I'm pretty new to ASP.Net, is it possible to pass arguments (maybe objects too) to web forms without using a querystring in the URL? Thanks Kev
12
2689
by: Andrew Bullock | last post by:
Hi, I have two classes, A and B, B takes an A as an argument in its constructor: A a1 = new A(); B b = new B(a1);
2
4080
by: Chad | last post by:
Sorry to create a new thread on an old post but I didn't get a viable answer and thought that the odds were against me getting one unless I started a new thread. My question was this: I want to pass a string variable from default3.aspx to default2.aspx. I create a property in default2.aspx, called "X", and assign a value. I then call Server.Transfer("default3.aspx")
0
9683
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
9529
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
10231
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
10176
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
10013
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
9054
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
6792
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
3733
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2927
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.