Hi, I'm trying to pass multiple values through querystrings to another page where i will parse them to individual variables.
I have one method to create the querystrings before they pass, but for some reason nothing is being passed.
Can anyone help me?
I have one method to create the querystrings before they pass, but for some reason nothing is being passed.
Can anyone help me?
Code:
protected void btnNext2_Click(object sender, EventArgs e) { if (MessageBox.Show("Proceed?", "Test Maintenance", MessageBoxButtons.YesNo) == DialogResult.Yes) Response.Redirect("TestParameters.aspx?" + GetComponentInfo()); } private string GetComponentInfo() { string compInfo = "Page1="; for (int i = 0; i < lstPage1Components.Items.Count; i++) compInfo += lstPage1Components.Items[i].Text.ToString(); compInfo += "&Page2="; for (int i = 0; i < lstPage2Components.Items.Count; i++) compInfo += lstPage1Components.Items[i].Text.ToString(); compInfo += "&Page3="; for (int i = 0; i < lstPage3Components.Items.Count; i++) compInfo += lstPage1Components.Items[i].Text.ToString(); compInfo += "&Page4="; for (int i = 0; i < lstPage4Components.Items.Count; i++) compInfo += lstPage1Components.Items[i].Text.ToString(); compInfo = compInfo.Replace(" ","-"); return compInfo; }
Comment