473,396 Members | 1,726 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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.redirect("secondpage") in a button click event.
Thanks.
--
Paul G
Software engineer.
Jun 27 '08 #1
4 2800
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**@discussions.microsoft.coma écrit dans le message de groupe de
discussion : 74**********************************@microsoft.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.redirect("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.EventArgs e)
{
//create instance of source web form
MyWebForm1 wf1;
//get reference to current handler instance
wf1=(MyWebForm1)Context.Handler;
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**@discussions.microsoft.coma crit dans le message de groupe de
discussion : 74**********************************@microsoft.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.redirect("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**@discussions.microsoft.comwrote in message
news:74**********************************@microsof 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.redirect("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**@discussions.microsoft.comwrote in message
news:74**********************************@microsof 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.redirect("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
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...
3
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) {...
27
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...
6
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...
3
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...
4
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,...
4
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" ...
4
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
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,...
0
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...
0
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...

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.