I am building a wizard and the first step of this wizard is to let the user select a file. In the following steps I need this file to display some data from it and as a final step I have to import some content of the selected file.
How can i preserve this file along the steps?
I can save the file on the server in a temp dir (and make sure it is linked to the user's session, so that no other import session will intervene). I can save the file in the session state (Viewbag maybe?) What would you do?
Edit:
The size can vary from 100kb - 10mb
You could use Sessions here but that has a few downsides. The oft-quoted one is the default configuration (in process) is fast but the session dies if the app pool gets restarted. Code-wise this means you typically need to check if your session has not died so you can handle it gracefully. This is fairly easy to do but it is some overhead.
The bigger downside there is the fact that the browser shares a session between all tabs so if someone does some normal modern browser stuff you can get massive confusion or at least UI weirdness. A good example of someone doing something like this would be united airlines -- you can only look at one of your flights at once due to session contention.
The approach I would take here is to have them upload the file, stash it in an appropriate place, generate an ID for it and then keep that in the wizard. When they complete it you can pick up the file at the end. If they start 2 at once it is easy to handle. Stay stateless.
I am building a wizard and the first step of this wizard is to let the...
I am a college student and need some help with this homework problem. I am taking an introductory Operating Scripting course (windows 10) I need to create a batch file named UserInfolog.bat. Instead of displaying the output to the screen, redirect all output to a file named computername.log and it must be created each time the batch file is executed. After redirecting the output to the log file, the batch file must display that file's contents in the command prompt...
I am a college student taking an INTRODUCTORY Windows 10 Operating System SCRIPTING course and need some help with the batch file I am creating for a homework assisgnment. I created the menu below and need some help with option A Please choose a task from the list below A) Add a new user account I need to use SET /P to prompt for a login name and if the user already exists display a message and return to the...
Hello! Can somebody please show me the step-by-step for the
reaction? I am getting B. as the answer but I am not sure if I am
correct or not. Please explain, thank you!
Preview File Edit View Go Tools Window Help く9凇令동삐:) 9696 CD Tue 4:10 PM OE 2211 Lecture 5A Aldehydes Ketones Fall 17 Student.pdf (page 29 of 69) Search ▼ 2211 Lecture 5A Aldehydes K 2 CH2CH2OH 312 27 H3C 3 a. 2,2-Diethoxypropane b. 2-Ethoxy-2-propandol c. Propane-2,2-diol 24
I need help in Python. This is a two step problem So I have the code down, but I am missing some requirements that I am stuck on. Also, I need help verifying the problem is correct.:) 7. Random Number File Writer Write a program that writes a series of random numbers to a file. Each random number should be in the range of 1 through 500. The application should let the user specify how many random numbers the file...
I have written code to display a temp reading on a RPI to an LCD screen in python. I am required to have the data be sent to a JSON file and am having trouble modifying this to happen. I know I import JSON but then do I create a data set or can I pull it directly from the data that is being collected. Below is my code. from grovepi import * from grove_rgb_lcd import * from time import...
This question is for Python 3. I can get the first couple of steps in this question but I get errors. Create a program that: Creates a sales receipt, displays the receipt entries and totals, and saves the receipt entries to a file Prompt the user to enter the Item Name Item Quantity Item Price Display the item name, the quantity, and item price, and the extended price (Item Quantity multiplied by Item Price) after the entry is made Save...
I am almost done with this code, but for some reason I am still getting an error message: Some of the instructions were: Using a loop, prompt for a currency to find. Inside the loop that manages the input, call the lookUpCurrency() method can pass the inputted currency code value. The lookUpCurrency() method needs to loop through the list of currencies and compare the passed currency code with the code in the array. If found, return true - otherwise return...
Hello I am confused about this C++ program. I need to create a
payroll C++ program following these steps.
Source file structure Your program will consist of three source files: main.cpp the main program Payroll.hppclass declaration for the Payroll class. Make sure you have an include guard. Payroll.cpp Payroll's member functions Class definition Create a Payroll class definition. The class has private members which originate from user input: number of hours worked hourly rate float float - and private members...
Hello I need help with this. I am trying to use JOptionpane to ask 5 questions. However I cannot get the program to do anything after an initial selection is made. Here is the assignment. Write an application that creates a quiz, which contains at least five questions about a hobby, popular music, astronomy, or any other personal interest. Each question should be a multiple choice question with at least three options. When a user answers a question correctly, display...
I am creating a program that will allow users to sign in with a username and password. Their information is saved in a text file. The information in the text file is saved as such: Username Password I have created a method that will take the text file and convert into an array list. Once the username and password is found, it will be removed from the arraylist and will give the user an opportunity to sign in with a...