<br /> Line 19: {<br /> Line 20: al.Add(item);<br /> Line 21: string ss = al[item].ToString();<br /> Line 22: Response.Write(ss);<br /> Line 23: }<br />
protected void Button1_Click(object sender, EventArgs e) { ArrayList myAL1 = new ArrayList(); myAL1.Add(txtId.Text.ToString()); myAL1.Add(txtName.Text.ToString()); string items = String.Join(",", ((string[])myAL1.ToArray(typeof(String)))); string url = "ReceiveValueOfTextBoxSendingInLoop.aspx?items=" + items; Response.Redirect(url); }
protected void Page_Load(object sender, EventArgs e) { if (Request.QueryString["items"].ToString() != null) { string[] items = Request.QueryString["items"].ToString().Split(','); ArrayList al = new ArrayList(); foreach (string item in items) { al.Add(item); string ss = al[item].ToString(); Response.Write(ss); } //string ss = al[0].ToString(); //string ss1 = al[1].ToString(); // Response.Write(ss); // Response.Write(ss1); } }
string[] items = Request.QueryString["items"].ToString().Split(','); ArrayList al = new ArrayList(); foreach (string item in items) { al.Add(item); string ss = al[0].ToString(); string ss1 = al[1].ToString(); Response.Write(ss); }
using System.Collections;
string ss = al[item].ToString();
string
Add()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)