protected void btn_Add_Click(object sender, EventArgs e) { string countryName = txt_CountryName.Text; bool checkinserted = CountryBLL.CheckNameInserted(countryName); if (!checkinserted) { CountryBLL.InsertNewCountry(countryName); } if (Request.QueryString["Redirect"] == "AddUserCountry") { Response.Redirect($"~/Pages/User/AddUserCountry.aspx"); } if (Request.QueryString["Redirect"] == "MyProfile") { MembershipUser CurrentUser = Membership.GetUser(); if (CurrentUser == null) { Response.Redirect($"~/Pages/Common/MainLogin.aspx"); } Guid UserId = (Guid)CurrentUser.ProviderUserKey; Response.Redirect($"~/Pages/User/MyProfile.aspx"); } }