473,799 Members | 2,786 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

passing parameters from one page to another

Hi, just wondering if anyone can provide a brief example of passing
parameters from one webpage to another, C# VS2005? I need to pass several
selected values of dropdown list boxes to a secondary page. I have a
response.redire ct("secondpage" ) in a button click event.
Thanks.
--
Paul G
Software engineer.
Jun 27 '08 #1
4 2817
Try :

http://www.dotnetbips.com/articles/c...946f4d311.aspx

Plus :
- you could pass a single value and read the rest from a db especially if
you need to persist those values on a longer term (first step of a db update
for example)
- if this is a multistep operation you could post to the same page and have
a wizard like logic inside your page...

--
Patrice

"Paul" <Pa**@discussio ns.microsoft.co ma écrit dans le message de groupe de
discussion : 74************* *************** **...icrosof t.com...
Hi, just wondering if anyone can provide a brief example of passing
parameters from one webpage to another, C# VS2005? I need to pass several
selected values of dropdown list boxes to a secondary page. I have a
response.redire ct("secondpage" ) in a button click event.
Thanks.
--
Paul G
Software engineer.

Jun 27 '08 #2
thanks for the response. I tried to impliment the server.transfer method but
WebForm1 is not recognized on the destination form. I replaced Webform1 with
the name of my source webform but it is still not defined on the destination
page.

private void Page_Load
(object sender, System.EventArg s e)
{
//create instance of source web form
MyWebForm1 wf1;
//get reference to current handler instance
wf1=(MyWebForm1 )Context.Handle r;
Label1.Text=wf1 .Name;
Label2.Text=wf1 .EMail;
}

--
Paul G
Software engineer.
"Patrice" wrote:
Try :

http://www.dotnetbips.com/articles/c...946f4d311.aspx

Plus :
- you could pass a single value and read the rest from a db especially if
you need to persist those values on a longer term (first step of a db update
for example)
- if this is a multistep operation you could post to the same page and have
a wizard like logic inside your page...

--
Patrice

"Paul" <Pa**@discussio ns.microsoft.co ma crit dans le message de groupe de
discussion : 74************* *************** **...icrosof t.com...
Hi, just wondering if anyone can provide a brief example of passing
parameters from one webpage to another, C# VS2005? I need to pass several
selected values of dropdown list boxes to a secondary page. I have a
response.redire ct("secondpage" ) in a button click event.
Thanks.
--
Paul G
Software engineer.

Jun 27 '08 #3
Easiest way: put the values on the querystring and read them back on the
target page. You could also consider storing the items in Session state.
Peter

"Paul" <Pa**@discussio ns.microsoft.co mwrote in message
news:74******** *************** ***********@mic rosoft.com...
Hi, just wondering if anyone can provide a brief example of passing
parameters from one webpage to another, C# VS2005? I need to pass several
selected values of dropdown list boxes to a secondary page. I have a
response.redire ct("secondpage" ) in a button click event.
Thanks.
--
Paul G
Software engineer.
Jun 27 '08 #4
Hi ended up using the query string which was easy to impliment. Would be
nice to figure out how to create an instance of the source web form on the
destination webform. I created a new post (create an instance of one webform
on another) to see if anyone has done it. Thanks.
--
Paul G
Software engineer.
"Peter Bromberg [C# MVP]" wrote:
Easiest way: put the values on the querystring and read them back on the
target page. You could also consider storing the items in Session state.
Peter

"Paul" <Pa**@discussio ns.microsoft.co mwrote in message
news:74******** *************** ***********@mic rosoft.com...
Hi, just wondering if anyone can provide a brief example of passing
parameters from one webpage to another, C# VS2005? I need to pass several
selected values of dropdown list boxes to a secondary page. I have a
response.redire ct("secondpage" ) in a button click event.
Thanks.
--
Paul G
Software engineer.
Jun 27 '08 #5

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

Similar topics

12
6559
by: Kevin Lyons | last post by:
Hello, I am trying to get my select options (courses) passed correctly from the following URL: http://www.dslextreme.com/users/kevinlyons/selectBoxes.html I am having difficulty getting the courses to pass the correct option value and then be displayed at the following URL: http://www.dslextreme.com/users/kevinlyons/selectResults.html I am passing countries, products, and courses. The first two display
3
14955
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);
27
6215
by: Oscar | last post by:
I am looking for a way to pass an ADO recordset that has been retrieved in an ASP page to another HTML-page. Is there someone who can provide me with a small sample or a link to see how this is done? regards, Oscar
6
1652
by: Eric Johnston | last post by:
I want the visitor to enter three numbers on the page and then click a button "generate image" which will I hope cause a generated gif image to be displayed alongside on the page. This involved a php page elsewhere which does all the computing of the gif image. I can make this work successfully by using a static call like: <img src="test12.php?a=15&b=65&c=33000" width="200" height="200"> How do I write javascript to allow the visitor...
3
10838
by: Joe Bloggs | last post by:
Does anyone know if its possible to pass parameters or the values of Request.QueryString from a web page to a custom control class? I'm using a C# Web Application. For Example I have Web Page1 which has to parameters passed to it from another Web page Parameter # 1 dbid and Parameter # 2 reportid. I know that I can access the values of the parameters from the code behind .aspx.cs using Request.QueryString so
4
1963
by: Doruk | last post by:
The problem that we are experiencing is simple: We want to pass certain parameters from a page with several server controls to another page. We want to do this in a dotnet compliant manner, but we can't seem to find a good and clean solution anywhere. The options we looked into are as follows. Comments following the options are why we did not want to go with them:
4
7160
by: David Freeman | last post by:
Hi There! I'm just wondering if there's a way to pass parameters (as if you were passing parameters to a ASCX web control) when calling an ASPX page? e.g. MyDetailsPage.UserName = "david" OR... the only way to do it is to use the QueryString or Session object?
4
4167
by: moondaddy | last post by:
I have a htm page where I need to pass some data to an aspx page as a means of sending data to the database. I don't need to see the aspx page so I was going to put it in a hidden iframe. This works real good. Since I don't need the aspx page to do any postback, is there a way to pass a parameter to it with out it finishing the round trip back to the htm page? Thanks. -- moondaddy@newsgroup.nospam
0
9687
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
9543
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
10257
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
10237
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
9077
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
7567
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
5467
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...
1
4144
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
3761
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.