xcaliber2222
Programmer
Hello, I have this C# code I've written which I need to convert to VB. Could someone please show me this in VB?
methods in webform1.aspx.cs:
Page_Load method in webform2.aspx.cs:
I would appreciate any help. Thanks, Alejandro
methods in webform1.aspx.cs:
Code:
private void InitializeComponent()
{
this.btnSubmit.Click += new System.EventHandler(this.btnSubmit_Click);
//this.btnSub2.Click += new System.EventHandler(this.btnSub2_Click);
this.Load += new System.EventHandler(this.Page_Load);
}
private void btnSubmit_Click(object sender, System.EventArgs e)
{
string p1 = this.txtName.Text.Replace("&","%26");
//string p2 = this.txtLastName.Text.Replace("&","%26");
string sln = "WebForm2.aspx?" +
"Name=" + p1;
//"&LastName=" + p2;
Response.Redirect(sln);
}
Page_Load method in webform2.aspx.cs:
Code:
private void Page_Load(object sender, System.EventArgs e)
{
this.txtBox1.Text = Request.QueryString["Name"];
//this.txtBox2.Text = Request.QueryString["LastName"];
foreach( string s in Request.QueryString)
{
Response.Write(Request.QueryString[s]);
Response.Write("<br>");
}
for (int i =0;i < Request.QueryString.Count;i++)
{
Response.Write(Request.QueryString[i]);
Response.Write("<br>");
}
}
I would appreciate any help. Thanks, Alejandro