i want to call a method that placed in tag in master page
like this
<script runat="server">
protected void usernameTextBox_TextChanged(object sender, System.EventArgs e)
{
}
</script>
inside a form that uses this master page.
note: that i will use this method for example by a textbox inside formview
Thanks.
At form load assign the master page textbox handler to your content page Textbox event.
protected void Page_Load(object sender, EventArgs e)
{
MasterPageClassName MyMasterPage = (MasterPageClassName)Page.Master;
TextBox t = new TextBox();
t.TextChanged += new EventHandler(MyMasterPage.usernameTextBox_TextChanged);
}