473,785 Members | 2,738 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to transfer large data to one page to another page

21 New Member
Hai

I am creating one web application

i am using xml String with one containing xml Output to assign that temporary variable..

this my requirement

I want to transfer one xml file to another or Redirected web page

how to transfer xml file or large data to another page

i am using ViewState and Query String

i am using ViewState

but another page the viewstate value is nothing



please help how to transfer..

reply me..
Oct 18 '07 #1
2 2272
mikeyeli
63 New Member
Complete post below...
Oct 18 '07 #2
mikeyeli
63 New Member
I think you got wrong the idea of what the viewstate is for, The ViewState's purpose in life is to persist state across postbacks. and thats it.

So, to accomplish what you want to do, you have in my opinion 2 viable options:
  • Session Variables
  • Using Server.Transfer


Session Variables
A way to pass values across pages. you can store control values and access them in anoter webform. the problem with this is that if you store too much data in session, than it can be a real problem for your server.
Besides that you are the one that is in charge of cleaning session variables properly.

Ex(just an example you can adapt it to your needs):

Expand|Select|Wrap|Line Numbers
  1. Session["XMLSTRING"]  = xmlString;
  2. Response.Redirect("WebForm2.aspx");
On the page load of WebForm2.aspx(o r anywhere else)
you can use that session variable:

Expand|Select|Wrap|Line Numbers
  1. string someOtherThing = Convert.ToString(Session["XMLSTRING"]);
Server.Transfer
Server.Transfer might be a bit more complex. you must expose values you want to other pages as properties of the page class.
So you need to add properties so you can acces them in another webform, i prefer this method since its more object oriented.

Ex:

this goes on the "WebForm1.a spx"

Expand|Select|Wrap|Line Numbers
  1. public string anyValue
  2. {
  3.                 get
  4.     {
  5.         return TextBox1.Text;
  6.     }
  7. }
  8.  
  9. void button_click(object sender, System.EventArgs e)
  10. {
  11.                 Server.Transfer("WebForm2.aspx")
  12. }
  13.  
On "WebForm2.a spx"
Expand|Select|Wrap|Line Numbers
  1. void page_load(object sender, System.EventArgs e)
  2. {
  3.       WebForm1 webform;
  4.       webform=(WebForm1)Context.Handler;
  5.       label1.Text = webform.anyValue
  6. }
Oct 18 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

6
2239
by: StephenMcC | last post by:
Hi All, Got a quick query in relation to the Server.Transfer method available in IIS 5+/ASP. I've got an issue where I want to take a portion of an online app and extract this out into a web site on its own, so I will end up having two web sites. This planned to aid problems we've been having with performance, as if the portion (which is an app in its own right) has problems we then have to restart the whole site and so bring everything...
5
7409
by: Tom | last post by:
Hi I am trying to transfer to a different .ASPX page using Server.Transfer. However, I get the following error: "Error executing child request for .aspx." Anyone know why? Thanks for help.
3
2145
by: Manuel Lopez | last post by:
Hello, We have two applications that will reside on the same webserver. We want to be able to post from pages in App1 to to pages in App2. We need to pass sensible data, so we cannot use querystring. We are using server.transfer (needing to reference App2 in App1).
2
2023
by: ndario | last post by:
i am trying to transfer a user to another page with Server.Transfer() but i am having a problem with sending query params like this Server.Transfer("newPage.aspx?param=value"); in the PageLoad method of the newPage.aspx.cs, Request.QueryString is allways null. is there any way to transfer to another page, but to recive a param on the another page. i even try with response.redirect, but it doesn't help. also, puting value in the...
2
3761
by: David Berman | last post by:
It seems that my site is losing session information when using Server.Transfer. I have a page called PictureGallery.aspx. It takes an argument which is an index id, so it would look like PictureGallery.aspx?id=30 to display gallery 30. In this way I have a database driven picture gallery. To improve indexing, I put code in Global.asax to allow me to get to the same page with a url like this: Pictures_30.aspx. There is no...
15
1948
by: dee | last post by:
Hi, I'm curious why MS decided to have Transfer hide the target page's url invisible? Any guesses ? Thanks. Dee.
11
2451
by: E.T. Grey | last post by:
Hi, I have an interesting problem. I have a (LARGE) set of historical data that I want to keep on a central server, as several separate files. I want a client process to be able to request the data in a specific file by specifying the file name, start date/time and end date/time. The files are in binary format, to conserve space on the server (as well as to increase processing time). The data in each file can be quite large, covering...
10
10626
by: David | last post by:
I have googled to no avail on getting specifically what I'm looking for. I have found plenty of full blown apps that implement some type of file transfer but what I'm specifcally looking for is an example to follow for using a tcp socket to transfer files between client/server, server/client. Both server and client are my program so I'm not looking for how to implement an FTP client, or how to download a file from a web server via http...
2
3121
by: =?Utf-8?B?YWxiZXJ0b3Nvcmlh?= | last post by:
Hi, I'm using Threads, and when I try to do Server.Transfer, I recieved an error. (child object does not exist...) My Code: Dim t As New Thread(AddressOf Hilo) Private Sub Hilo() Thread.Sleep(1000)
0
9480
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
10319
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10147
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...
0
8971
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
7496
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
6737
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
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4046
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
3
2877
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.