How to Display a Status Message on the Next Page after a Redirect with .net Framework?
<p>I am adding a form to my .net web forms application and I want to redirect the user to another page but display a status message after the redirect such as 'Your articles has been submitted successfully'.</p>

<p>Any good ways of doing this?</p>

<p>I was thinking of doing it with sessions and a user control but wanted to see if there is an easier way.</p>

<p>Thought about code like this:</p>

<p>User control codebehind:</p>

<pre><code>    public String SessionName { get; set; }
    public String Message
    {
        get
        {
            if (Session[SessionName] == null)
                return String.Empty;

            return Session[SessionName].ToString();
        }

    }

    protected void Page_Unload(object sender, EventArgs e)
    {
        Session[SessionName] = null;
    }
</code></pre>

<p>User control markup:</p>

<pre><code>&lt;% if (!String.IsNullOrEmpty(Message))
   {%&gt;
        &lt;div&gt;
            &lt;%= Message %&gt;
        &lt;/div&gt;
&lt;%} %&gt;
</code></pre>
