1) If you are talking about HTML5's local storage this is not compatible with all browsers. So, unless you want to leave users of IE9 and below out, you have to user a server side approach
2) This works and I recommend this solution if you want to persist the data for long periods
3) Viewstate stores data in the page so if you redirect the user somewhere else it gets lost.
Other than this, you can keep the data in session: Session["textarea_content"] = txtID.Text
. The data will be available during that session, which means that it expires when the user closes the browser or leaves it unattended.
So here are my recommendations:
Use the viewstate if you only need the data while the user is in that specific page
Use session if you only need the data while the user is active on the website
Use the database if you want to keep the data available even if the user leaves