Oracle 5.0 Reference Manual page 1893

Table of Contents

Advertisement

Figure 20.48. Simple Profile Application
These will allow the user to enter some profile information. The user can also use the buttons to
save their profile, clear the page, and restore their profile data.
2. In the Code View add code as follows:
...
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
TextBox1.Text = Profile.Name;
TextBox2.Text = Profile.Age.ToString();
Label1.Text = Profile.UI.Color;
}
}
// Store Profile
protected void Button1_Click(object sender, EventArgs e)
{
Profile.Name = TextBox1.Text;
Profile.Age = UInt16.Parse(TextBox2.Text);
}
// Clear Form
protected void Button2_Click(object sender, EventArgs e)
{
TextBox1.Text = "";
TextBox2.Text = "";
Label1.Text = "";
}
// Retrieve Profile
protected void Button3_Click(object sender, EventArgs e)
{
TextBox1.Text = Profile.Name;
TextBox2.Text = Profile.Age.ToString();
Label1.Text = Profile.UI.Color;
}
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
Connector/Net Tutorials
1873

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents