|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class MasterPage : System.Web.UI.MasterPage
{
protected void Page_Load(object sender, EventArgs e)
{
txtMasterBox1.Focus();
}
//expose controls on master page as public properties
public TextBox PropertyMasterTextBox1
{
get { return txtMasterBox1; }
set { txtMasterBox1 = value; }
}
public TextBox PropertyMasterTextBox2
{
get { return txtMasterBox2; }
set { txtMasterBox2 = value; }
}
public Button PropertyMasterButton1
{
get { return btnMasterButton1; }
}
public Button PropertyMasterButton2
{
get { return btnMasterButton2; }
}
//expose public methods on master page for content page to call
public void SetMasterBox1Value(string myText)
{
txtMasterBox1.Text = myText;
}
public string GetMasterbox1Value()
{
return txtMasterBox1.Text;
}
public void SetMasterBox2Value(string myText)
{
txtMasterBox2.Text = myText;
}
public string GetMasterBox2Value()
{
return txtMasterBox2.Text;
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Web & Database Developer. Design and implement web and database applications utilizing Microsoft and other development tools.