This commit is contained in:
EggMan20339 2024-03-28 13:14:16 -04:00
parent c0a46744b3
commit 9d9fad5a48
2 changed files with 5 additions and 4 deletions

View File

@ -13,8 +13,8 @@ namespace CH78
{ {
string studentID = ""; string studentID = "";
string gender; string gender;
string id = StudentDataTier.DecryptQueryString(Request.QueryString["ID"], "CNSAcnsa1", "salty").Trim('\0');
string id = StudentDataTier.DecryptQueryString(Request.QueryString["ID"], "CNSAcnsa1", "salty");
if (!IsPostBack) if (!IsPostBack)
{ {
@ -27,7 +27,7 @@ namespace CH78
Response.Redirect("Home.aspx"); Response.Redirect("Home.aspx");
} }
else if (id.ToUpper() == "NEW") else if (id.ToUpper().Trim() == "NEW")
{ {
BindDDL(); BindDDL();
} }

View File

@ -265,9 +265,10 @@ namespace CH78
protected void btnNew_OnClick(object sender, EventArgs e) protected void btnNew_OnClick(object sender, EventArgs e)
{ {
string recordToBeEdited; string recordToBeEdited = "NEW";
Int64 mEditedRecord = 0; Int64 mEditedRecord = 0;
System.Text.StringBuilder sb = new System.Text.StringBuilder(); System.Text.StringBuilder sb = new System.Text.StringBuilder();
recordToBeEdited = StudentDataTier.EncryptQueryString(recordToBeEdited, "CNSAcnsa1", "salty");
try try
{ {
@ -277,7 +278,7 @@ namespace CH78
// this script will open a popup // this script will open a popup
sb.Append("<script language='javascript'>"); sb.Append("<script language='javascript'>");
sb.Append("window.open('Display.aspx?ID=NEW&type=NEW' , 'DisplayEdit',"); sb.Append("window.open('Display.aspx?ID="+ recordToBeEdited +"&type=NEW' , 'DisplayEdit',");
sb.Append("'width=1025, height=525, menubar=no, resizable=yes, left=50, top=50, scrollbars=yes');"); sb.Append("'width=1025, height=525, menubar=no, resizable=yes, left=50, top=50, scrollbars=yes');");
sb.Append("</script>"); sb.Append("</script>");