asp.net url generation with name and id
<pre><code>test.Controls.Add(GetButton(thisReader["session_id"].ToString(), "Join Session"));
</code></pre>

<p>I have changed the above code to the one below to</p>

<pre><code>test.Controls.Add(GetButton(thisReader["session_name"].ToString(), "Join Session"));
</code></pre>

<p>I did this because i wanted to have my end of URL <code>session= session_name</code> instade of the <code>session_id</code> . doing this now created a problem because the since session_id was not passed i the results on the next page based on session_id are not displayed.Please refer the original question  <a href="http://stackoverflow.com/questions/10046586/asp-net-url-generation">asp.net url generation</a></p>

<pre><code>Response.Redirect("EnterSession.aspx?session=" + e.CommandArgument.ToString());
</code></pre>

<p>how can solve this problem ?</p>

<p>c# part of entersession.aspx</p>

<pre><code>public partial class _EnterSession2 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {



            SessionID.Value = Request.QueryString["session"];
            // Label2.Text = DateTime.Now.ToString();  
            if (User.Identity.IsAuthenticated)
            {
                string userName = User.Identity.Name;
                //Username.Value = User.Identity.Name;
                Username.Value = userName.ToLower();
                HiddenField1.Value = User.Identity.Name;
            }

        }
</code></pre>
