Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2014-01-22
5
Medium Priority
?
204 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 2000 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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
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 …
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

618 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