public ActionResult ViewMyProfile(string username) { if (!string.IsNullOrEmpty(username)) { MemberAction objMember = new MemberAction(); string UserId = objMember.FindUserIdByURL(username); if (!string.IsNullOrEmpty(UserId)) Response.Redirect("/Member/UserDetail/" + UserId); else return RedirectToAction("NotFound", "UserProfile"); } else { return RedirectToAction("NotFound", "UserProfile"); } return View(); }