473,616 Members | 2,973 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

pass value to the second page

hi,

i am new to asp.net. here is what i want to do. i have 2 aspx pages,
first.aspx and second.aspx

now from the first.aspx i want to give the second.aspx page values like

second.aspx?Dow nloadFile=1

so, the second page give the user the requested file for download.

any suggestions, i am doing it in vb.net ?

and can somone recommend a ASP.NET via VB.NET book.

thanks,
AB

Nov 19 '05 #1
6 1246
ab**********@ho tmail.com wrote:
hi,

i am new to asp.net. here is what i want to do. i have 2 aspx pages,
first.aspx and second.aspx

now from the first.aspx i want to give the second.aspx page values like

second.aspx?Dow nloadFile=1

so, the second page give the user the requested file for download.

any suggestions, i am doing it in vb.net ?

and can somone recommend a ASP.NET via VB.NET book.

thanks,
AB


how are you getting to the second page? Just write the QueryString onto
the link, or in the redirect.

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com
Nov 19 '05 #2
Hi AB,

I think this book is good cause the other is recognized as a good teacher.
I haven't read it though (I came from classic asp and read on the internet
the howto's)
http://www.amazon.com/exec/obidos/tg...books&n=507846
Jesse Liberty also knows how to write a book :
http://www.amazon.com/exec/obidos/tg...books&n=507846

The simplest way to solve your problem is to do a response.redire ct to the
file you wish to push to your user.

Let me know if you have any more questions...

Cheers,
Tom Pester
hi,

i am new to asp.net. here is what i want to do. i have 2 aspx pages,
first.aspx and second.aspx

now from the first.aspx i want to give the second.aspx page values
like

second.aspx?Dow nloadFile=1

so, the second page give the user the requested file for download.

any suggestions, i am doing it in vb.net ?

and can somone recommend a ASP.NET via VB.NET book.

thanks,
AB

Nov 19 '05 #3
Also a video says more than 1000 pictures :

http://www.microsoft.com/events/seri...ialaspnet.mspx

Cheers,
Tom Pester
hi,

i am new to asp.net. here is what i want to do. i have 2 aspx pages,
first.aspx and second.aspx

now from the first.aspx i want to give the second.aspx page values
like

second.aspx?Dow nloadFile=1

so, the second page give the user the requested file for download.

any suggestions, i am doing it in vb.net ?

and can somone recommend a ASP.NET via VB.NET book.

thanks,
AB

Nov 19 '05 #4
> how are you getting to the second page? Just write the QueryString onto
the link, or in the redirect.


hi,

via redirect.

thanks,

Nov 19 '05 #5
hi,
thanks a lot everyone. i have sloved the problem!

here is how:

First.aspx
Private Sub LinkButton1_Cli ck(...bla bla)
Response.Redire ct("second.aspx ?DownloadFile=1 ")
End Sub

Second.aspx
Private Sub Page_Load(...bl a bla)
Dim MyTemp As String
MyTemp = Request.Item("D ownloadFile")

Select Case MyTemp
Case "1"
Response.Redire ct("MyFile1.zip ")
Case "2"
Response.Redire ct("MyFile2.zip ")
Case Else
MsgBox("Hello World", MsgBoxStyle.Inf ormation)
End Select
End Sub

thank, bye,
AB

Nov 19 '05 #6
This article provides some useful samples about uploading and downloading
files with ASP.NET:
http://SteveOrr.net/articles/EasyUploads.aspx

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
<ab**********@h otmail.com> wrote in message
news:11******** ************@f1 4g2000cwb.googl egroups.com...
hi,

i am new to asp.net. here is what i want to do. i have 2 aspx pages,
first.aspx and second.aspx

now from the first.aspx i want to give the second.aspx page values like

second.aspx?Dow nloadFile=1

so, the second page give the user the requested file for download.

any suggestions, i am doing it in vb.net ?

and can somone recommend a ASP.NET via VB.NET book.

thanks,
AB

Nov 19 '05 #7

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

Similar topics

1
1433
by: jeremylim2000 | last post by:
Hi! For Example, text for Product code, name (both is text) is from form A and I want pass the Product Code, and name to form B using eg. session('txtproduct') & session('txtname'). As in Form, Product code, name is get from database value. some sample example I try ...
17
7361
by: Fresh Air Rider | last post by:
Hello Could anyone please explain how I can pass more than one arguement/parameter value to a function using <asp:linkbutton> or is this a major shortfall of the language ? Consider the following code fragments in which I want to list through all files on a directory with a link to download each file by passing a filename and whether or not to force the download dialog box to appear.
2
12351
by: macyp | last post by:
I have to pass values from one aspx page to another. The controls I have in the first page are: a textbox, 3 drop down lists, and 2 check boxes, and a submit button. It is a search page, and the users need not enter values in all the controls. they can leave the textbox blank, and select values from one drop down, or any other combinations. I am trying to pass values with the help of session variables. But I have multiple if else...
19
9073
by: nazgulero | last post by:
Hello all, I wonder if anybody can give me a hint about what I have to do to get this working: I am creating a drop down box using the script below. The result is two text fields; now I want to pass those values, which come from the drop down box, to the next page. The next page should then simply look like this:
2
2505
by: c676228 | last post by:
Hi, This is my first time to post asp.net question on this forum. I have a question for "How to pass the first form value to the next form" I have enrollinfo.aspx form which look like as follow: <form id="Form1" method="post" runat="server"> <Subway:Address id="address" runat="server" Caption="Home Address"></Subway:Address> <p></p> <SUBWAY:PEOPLEINFO id="Peopleinfo" runat="server" Caption="Employee Information"></SUBWAY:PEOPLEINFO>
3
1802
by: Sharon | last post by:
hello all, I was successfull in passing one value from first webpage to second webpage, but not sure how to pass three textbox values from the first page to the second page. Below is the code i was using to pass a single value First WebPage: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
14
20387
by: Abhi | last post by:
I wrote a function foo(int arr) and its prototype is declared as foo(int arr); I modify the values of the array in the function and the values are getting modified in the main array which is passed also. I understand that this way of passing the array is by value and if the prototype is declared as foo(int *), it is by reference in which case the value if modified in the function will get reflected in the main function as well. I dont...
6
2387
by: txguy | last post by:
thanks for your help. we have a html form with multiple checkboxes, over 1210, and we are running a javascript that tallies total number of boxes and prices for the checkboxes the user selects. data looks like this .... <input type="checkbox" name="C07001" id="C07001" value=1 descrip="3'x18', BROWN, ASD-BRO-07001, oz, Denier, Weave, Grommets every inchs, each @****4.97" item="07001" price="****4.97" onclick="totalCheckboxes(this);"...
3
3173
by: Aussie Rules | last post by:
Hi, I have a few aspx (.net2) form. The first form allows the user to enter into text box, and select values from drop downs The second form needs to use these values to process some data. I am currently using the url to pass the values such as
1
2559
by: kkshansid | last post by:
i want to pass both variables($q1 and value of select) from this php page to java script so that i can get both variables in second php file srt.php <script type="text/javascript" src="st.js"></script> <?php $q1=$_GET; require("conn.php"); $sql="SELECT distinct(".$q1.")FROM inst";
0
8203
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
8146
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
8592
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
8297
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,...
1
6097
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
5550
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();...
0
4063
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
4141
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1759
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.