473,394 Members | 2,071 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,394 software developers and data experts.

How to send a big amount of data from an aspx page to another

Hi,
I have webpage (sql.aspx) in asp.net with a big textbox. In this
box, I generate SQL queries. Some of the queries can takes more than
2000 characters lenght. I want to send the content of the textbox (the
query) in another webpage(result.aspx) textbox. I just don't know how.
Can I use postmethod send ? can I use a public textbox object ? and
how ?

thank you,
Simon
Nov 17 '05 #1
3 2837
If the page has same session scope(in the same virtual directory) use
session...
"Simon" <mu**********@hotmail.com> wrote in message
news:79*************************@posting.google.co m...
Hi,
I have webpage (sql.aspx) in asp.net with a big textbox. In this
box, I generate SQL queries. Some of the queries can takes more than
2000 characters lenght. I want to send the content of the textbox (the
query) in another webpage(result.aspx) textbox. I just don't know how.
Can I use postmethod send ? can I use a public textbox object ? and
how ?

thank you,
Simon

Nov 17 '05 #2
Session, Cache, Database, etc.

--
I hope this helps,
Steve C. Orr, MCSD
http://Steve.Orr.net
"Simon" <mu**********@hotmail.com> wrote in message
news:79*************************@posting.google.co m...
Hi,
I have webpage (sql.aspx) in asp.net with a big textbox. In this
box, I generate SQL queries. Some of the queries can takes more than
2000 characters lenght. I want to send the content of the textbox (the
query) in another webpage(result.aspx) textbox. I just don't know how.
Can I use postmethod send ? can I use a public textbox object ? and
how ?

thank you,
Simon

Nov 17 '05 #3
You could use something like the following to Post that data to your
receiver page and then use the posted data 'Request.form.tosting()' to
process it from the receiver page. Something like the following (not tested)
Carefull for screen wrapping.

<%@ Import Namespace="System.Net" %>
<%@ Import Namespace="System.IO" %>

<html>
<script language="vb" runat="server">

Sub button_click(sender as object, e as EventArgs)

Dim mgWebRequest As HttpWebRequest
Dim stringPost, stringResult As String
Dim mgStreamWriter As StreamWriter
Dim mgWebResponse As HttpWebResponse
Dim mgStreamReader As StreamReader

mgWebRequest
=CType(WebRequest.Create("http://your.website.com/yourreceive.aspx"),HttpWeb
Request)

mgWebRequest.Method = "POST"
stringPost = senddata.text
mgWebRequest.ContentLength = stringPost.length 'length
mgWebRequest.ContentType = "application/x-www-form-urlencoded"
mgStreamWriter = Nothing
mgStreamWriter = New StreamWriter(mgWebRequest.GetRequestStream())
mgStreamWriter.Write(stringPost)
mgStreamWriter.Close()
mgWebResponse = CType(mgWebRequest.GetResponse(),HttpWebResponse)
mgStreamReader = New StreamReader(mgWebResponse.GetResponseStream())
stringResult = mgStreamReader.ReadToEnd()
response.write(stringResult)
mgStreamReader.Close()
end sub
</script>
<body>
<form runat=server>
<asp:textbox id=senddata text="text that your want to send" width=500
textmode=multiline rows=26 wrap=true runat=server/>
<asp:button id=send text=send onclick=button_click runat=server/>
</form>
</body>
</html>
"Simon" <mu**********@hotmail.com> wrote in message
news:79*************************@posting.google.co m...
Hi,
I have webpage (sql.aspx) in asp.net with a big textbox. In this
box, I generate SQL queries. Some of the queries can takes more than
2000 characters lenght. I want to send the content of the textbox (the
query) in another webpage(result.aspx) textbox. I just don't know how.
Can I use postmethod send ? can I use a public textbox object ? and
how ?

thank you,
Simon

Nov 17 '05 #4

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

Similar topics

2
by: HANG LAM | last post by:
Hi, Simple question, Is there a way to post the data from one .aspx page to another page ? For example, I have a Page1.aspx that lets the user enter data like "Last Name", "First Name", but...
5
by: charlies224 | last post by:
Hi, I am using SQL 2000 and has a table that contains more than 2 million rows of data (and growing). Right now, I have encountered 2 problems: 1) Sometimes, when I try to query against this...
4
by: ad | last post by:
I want to send a DataSet to WebService, but the DataSet if too huge(there about 50000 records, and 50 fields every record). My solution is 1.save the DataSet as XML file, 2.zip the XML file. 3....
1
by: khawar | last post by:
the following code seams to be sending a silent post. how can we not make it send a silent post but regular post where along with the post the control should also be transferred over to the other...
2
by: bhav | last post by:
Hi Guys, I have a Web Forms' 'Table' control in my default.aspx page, along with other controls. I wanted to implement a functionality where a user can click a button to open the table's...
0
by: Syed Aun Ali | last post by:
i am running an asp.net application on a IIs server with some clients connected through local network and Tcp/ip.i want to send data from a textbox control on a aspx page of a client machine to a...
9
by: eswanson | last post by:
I have a web page I need to post a file plus some other fields to it. How can I do this from a asp.net page. I know I can send individual fields to the other page, but how do I send a file to the...
6
by: Daniel Walzenbach | last post by:
Hi, I have a web application which sometimes throws an “out of memory” exception. To get an idea what happens I traced some values using performance monitor and got the following values (for...
4
by: =?Utf-8?B?dHBhcmtzNjk=?= | last post by:
I have a web page that at the click of a button must send a bunch (1000+) emails. Each email is sent individually. I have the code working fine, using Mail Message classes and smtp and all that. ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...
0
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...

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.