title: display data on gridview accordingly to current login user not working
body: <p>How do you actually display data that is retrieved from database according to the current login user? I used this method but it is actually not working. Where have i gone wrong?</p>
  
  <p>My .cs code:</p>
  
  <pre><code> int selectedRow = GridView1.SelectedIndex;
      GridViewRow row = GridView1.Rows[selectedRow];
      int UserId = Convert.ToInt32(row.Cells[0].Text);
  
      MembershipUser currentUser = Membership.GetUser();
      Guid currentUserId = (Guid)currentUser.ProviderUserKey;
  
      string strConnectionString = ConfigurationManager.ConnectionStrings["ASPNETDBConnectionString1"].ConnectionString;
  
      SqlConnection myConnect = new SqlConnection(strConnectionString);
  
      string strCommandText = "SELECT date, starttime, endtime, planner FROM bookings WHERE UserId =@UserId";
      SqlCommand cmd = new SqlCommand(strCommandText, myConnect);
  
      myConnect.Open();
      SqlDataReader reader = cmd.ExecuteReader();
      cmd.Parameters.AddWithValue("@UserId", UserId);
  
      reader.Close();
      myConnect.Close();
  </code></pre>