title: How to pass UserID or UserName into another page in asp.net membership feature using Query String?
body: <p>I have used asp.net membership feature in my project. My code in 'manage-users.aspx' is;</p>
  
  <pre><code>&lt;asp:GridView runat="server" ID="gridUserAccounts" SkinID="gridviewSkin" PageSize="5"&gt;
      &lt;Columns&gt;
          &lt;asp:BoundField HeaderText="User Name" DataField="UserName" /&gt;
          &lt;asp:BoundField HeaderText="Email" SortExpression="Email" DataField="Email" /&gt;
          &lt;asp:BoundField HeaderText="Last Login Date" SortExpression="LastLoginDate" DataField="LastLoginDate" /&gt;
          &lt;asp:BoundField HeaderText="Last Activity Date" SortExpression="LastActivityDate" DataField="LastActivityDate" /&gt;
          &lt;asp:TemplateField&gt;
              &lt;ItemTemplate&gt;
                   &lt;asp:HyperLink runat="server" NavigateUrl='&lt;%# "manage-user-detail.aspx?UserID=" %&gt;' ID="linkNavigate" Text="View Detail" /&gt;
               &lt;/ItemTemplate&gt;
           &lt;/asp:TemplateField&gt;
      &lt;/Columns&gt;
  &lt;/asp:GridView&gt;
  </code></pre>
  
  <p>my code behind for this grid view is this;</p>
  
  <pre><code>if (!Page.IsPostBack)
  {
      gridUserAccounts.DataSource = Membership.GetAllUsers();
      gridUserAccounts.DataBind();
  }
  </code></pre>
  
  <p>Now, my question is "How do pass the selected userID into another page i-e 'manage-user-detail.aspx' page using querystring in this 'item template' (in NavigateUrl property).</p>
  
  <pre><code>&lt;asp:TemplateField&gt;                          
   &lt;ItemTemplate&gt;
     &lt;asp:HyperLink runat="server" NavigateUrl='&lt;%# "manage-user-detail.aspx?UserID=" %&gt;'   ID="linkNavigate" Text="View Detail" /&gt;
   &lt;/ItemTemplate&gt;
  &lt;/asp:TemplateField&gt;
  </code></pre>
  
  <p>And "How do i show the the user details (catch querystring first and then) and show result in fromview in 'manage-user-detail.aspx' page.
  Any help will be apreciatable.</p>