protected void btnOk_Click(object sender, EventArgs e) { Path path = new Path { PathName = txtPathName.Text, PathUrl = txtPathUrl.Text }; if (id != 0) { path.PathId = id; pathService.Update(path); } else { pathService.Create(path); } PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); }