protected void Page_Load(object sender, EventArgs e) { UserBase oUser; //add a javascript chunk to the button to go back to the calling page ButtonGoBack.Attributes.Add("onClick", "javascript:history.back(); return false;"); //check to see if the user object is loaded into the session variable as it should be. If not then //redirect back to the select user page if (Session["SelectedUser"] == null) { Session["ErrorNote"] = "You must first select a user before you can show their PIN details"; Response.Redirect("~/SelectUser.aspx"); } oUser = (UserBase)Session["SelectedUser"]; LabelUserInfo.Text = "Connection User: "******"PIN Details:" + Environment.NewLine + oUser.Pin().DumpAllProps(" "); LabelPinDetails.Text = GlobalItems.FormatStringForHTML(strPinDetails); //remove the user from the session Session.Remove("SelectedUser"); ButtonGoBack.Focus(); }
protected override void InitBindings() { Bindings.Add(this.SetBinding(() => ViewModel.Message, () => TextView.Text)); ButtonGoBack.SetOnClickCommand(ViewModel.GoBackCommand); ButtonNavigateC.SetOnClickCommand(ViewModel.NavigateCCommand); ButtonNavigateCNoBackstack.SetOnClickCommand(ViewModel.NavigateCNoBackCommand); }
protected override void InitBindings() { ButtonGoBack.SetOnClickCommand(ViewModel.GoBackCommand); ButtonNavigateA.SetOnClickCommand(ViewModel.NavigateAWithFirstOccurrence); ButtonNavigateB.SetOnClickCommand(ViewModel.NavigateBWithFirstOccurrence); }