ASP.NET file data not being saved in page
So i need to upload user list from .xslx file and displa yit in a table for adjustments, then send send the users to mySQL db, the problem i have is that after i upload file and try to send ti db the "ExtractedData" returns null
10 Replies
You're doing some... weird stuff here, like all those
Task.FromResult<T>()
things
Also, properties don't stick around between requests
So that's something you need to mindhow do i get around it
Well, you will need to persist that data somehow. Database, cache, up to you
Any particular reason why file upload and sending the file contents to the db are two separate actions in the first place?
because the data needs to be displayed for review
then decided if send to db
Store it temporarily in the cache, then
Or save it in the db with an additional property like
Approved
set to false
Then, when accepted, set it back to true
And periodically delete data that has Approved=false
so i get all null valeus in my table now
because for some reason i can't just save a list
Well you're saving it in the session, so, yeah
That's why I said "cache" and not "session"
ah tought it's the same, that's my biggest problem
because
i never did web
and for some reason
i have to do website for final project
So same with the user list if im gonna have 10k+ users i should cache the data to load it faster right? @ZZZZZZZZZZZZZZZZZZZZZZZZZ
Why would you need to know all the users at all times?
hmm i don't