You can use the current SharePointContext instance instead of redirecting back to the SharePoint host and then being redirected once again to the app to get a new context (as suggested by Rahul).
Add these utility methods to the auto-generated SharePointContext.cs file (at around line 277 which is where the SharePointContext class definition ends. Don't forget to add 'using System.Linq;' and 'using System.Collections.Specialized;')
public void AddStandardTokensToQueryString(NameValueCollection queryString)
{
if (queryString == null)
{
throw new ArgumentNullException("queryString");
}
if (spHostUrl != null)
{
queryString[SPHostUrlKey] = SPHostUrl.AbsoluteUri;
}
if (spAppWebUrl != null)
{
queryString[SPAppWebUrlKey] = SPAppWebUrl.AbsoluteUri;
}
if (!string.IsNullOrWhiteSpace(SPLanguage))
{
queryString[SPLanguageKey] = SPLanguage;
}
if (!string.IsNullOrWhiteSpace(SPClientTag))
{
queryString[SPClientTagKey] = SPClientTag;
}
if (!string.IsNullOrWhiteSpace(SPProductNumber))
{
queryString[SPProductNumberKey] = SPProductNumber;
}
}
public String GetStandardTokensQueryStringValue()
{
NameValueCollection qs = new NameValueCollection();
AddStandardTokensToQueryString(qs);
return String.Join("&",
qs.AllKeys.Select(a => a + "=" + HttpUtility.UrlEncode(qs[a])));
}
How to use:
protected void btnSubmit_Click(object sender, EventArgs e)
{
SharePointContext spContext =
SharePointContextProvider.Current.GetSharePointContext(Context);
Response.Redirect("PollQuestionView.aspx?" +
spContext.GetStandardTokensQueryStringValue(), true);
}