not sure if this is even possible. What I'm trying to do is create a visual web-part for SharePoint 2010 (using Visual Studio 2013) that will allow the user to add the web-part to a page then add data to a text box, the data is then saved with the web-parts variables.
What I've tried so far is adding a button to the page that when clicked will set the variable but this doesn't seem to work as the page refreshes, which resets the content in the text-boxes to the stored data before the code can override it.
Does anyone know if this is even possible? Any help on this would be greatly appreciated as I've hit a brick wall. Cheers.