using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
namespace WebApplication22
{
public class WebForm1 : System.Web.UI.Page
{
protected System.Web.UI.WebControls.Label Label1;
protected System.Web.UI.WebControls.TextBox TextBox1;
protected System.Web.UI.WebControls.Label Label2;
protected System.Web.UI.WebControls.TextBox TextBox2;
protected System.Web.UI.WebControls.Label Label3;
protected System.Web.UI.WebControls.TextBox TextBox3;
protected System.Web.UI.WebControls.Button Button1;
protected string Focus;
protected string ControlType;
private void Page_Load(object sender, System.EventArgs e)
{
Focus = "TextBox1";
ControlType = "TextArea";
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
InitializeComponent();
base.OnInit(e);
}
private void InitializeComponent()
{
this.TextBox1.TextChanged += new System.EventHandler(this.TextBox1_TextChanged);
this.TextBox2.TextChanged += new System.EventHandler(this.TextBox2_TextChanged);
this.TextBox3.TextChanged += new System.EventHandler(this.TextBox3_TextChanged);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
private void TextBox1_TextChanged(object sender, System.EventArgs e)
{
Focus = "TextBox2";
ControlType = "TextArea";
}
private void TextBox2_TextChanged(object sender, System.EventArgs e)
{
Focus = "TextBox3";
ControlType = "TextArea";
}
private void TextBox3_TextChanged(object sender, System.EventArgs e)
{
Focus = "Button1";
ControlType = "Button";
}
}
}
Public Class WebForm1
Inherits System.Web.UI.Page
Protected WithEvents Label1 As System.Web.UI.WebControls.Label
Protected WithEvents TextBox1 As System.Web.UI.WebControls.TextBox
Protected WithEvents Label2 As System.Web.UI.WebControls.Label
Protected WithEvents TextBox2 As System.Web.UI.WebControls.TextBox
Protected WithEvents Label3 As System.Web.UI.WebControls.Label
Protected WithEvents TextBox3 As System.Web.UI.WebControls.TextBox
Protected WithEvents Button1 As System.Web.UI.WebControls.Button
Protected Focus As String
Protected ControlType As String
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
End Sub
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub
#End Region
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Focus = "TextBox1"
ControlType = "TextArea"
End Sub
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
Focus = "TextBox2"
ControlType = "TextArea"
End Sub
Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox2.TextChanged
Focus = "TextBox3"
ControlType = "TextArea"
End Sub
Private Sub TextBox3_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox3.TextChanged
Focus = "Button1"
ControlType = "Button"
End Sub
End Class