Solved

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

Posted on 2014-01-22
5
195 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
  • 3
  • 2
5 Comments
 
LVL 12

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 12

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 12

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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

706 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now