Solved

2 buttons, 1 is for redirecting 1 is for upload.

Posted on 2014-01-22
5
202 Views
Last Modified: 2014-02-11
Hi;

I have 2 buttons, 1 is for redirecting 1 is for upload a file. Redirection to a page works fine but I don't know the most feasible way to load a txt/xml file content and when redirecting button is clicked, it should redirect with the contents of the file. Any feasible way for this?

Regards.
0
Comment
Question by:jazzIIIlove
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 13

Expert Comment

by:jitendra patil
ID: 39799526
hi ,

please check the link below.
5 ways to send data between Asp.Net PAges

Http Post may be of help to you.

hope this helps.
0
 
LVL 12

Author Comment

by:jazzIIIlove
ID: 39799549
Thanks but it's not specific enough. It's a text file content, so which one is the best practice?
0
 
LVL 13

Expert Comment

by:jitendra patil
ID: 39799563
try the below hack.

read your whole text file data and store it in a byte array -> store it in a session object

go to the page you want -> create a byte array and restore the session object data in it.

again read the byte array and you will get all your text file data.

hope this helps.
0
 
LVL 12

Author Comment

by:jazzIIIlove
ID: 39800323
Hi,

Good tip, except for the case, the file must persist in remote file system if it's not there already, so session is a bad solution?
0
 
LVL 13

Accepted Solution

by:
jitendra patil earned 500 total points
ID: 39802191
try the below one:

before adding the file path to session check for the physical availablity of file.

save your file to a location-> add its path to the session object.

go to next page get data of session object containing file path.

read the whole file it will be easier than the above one.

hope this helps.
0

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question