Hi Asaf,
Thanks for sharing your solution with us.
As for data sharing between master page and concrete pages in ASP.NET 2.0,
you can also consider using custom properties. The "Page" class in ASP.NET
2.0 contains a "Master" property which refers to the page's master page(if
the page has applied a certain master page). Therefore, you can cast this
"Master" property into the exact type of the master page and access any
custom property defined in that master page class. e.g.
=======master page===========
public partial class App_Masters_MForm : System.Web.UI.MasterPage
{
public string TextBox1Text
{
get
{
return TextBox1.Text;
}
}
..................
========================
========concrete page=========
protected void Button1_Click(object sender, EventArgs e)
{
string txt = ((App_Masters_MForm)Master).TextBox1Text;
Response.Write("<br/>TextBox1Text: " + txt);
}
====================
The above master page class(App_Masters_MForm) uses a custom
property(TextBox1Text) to expose its inner control. Thus, the concrete page
can access that custom property through the converted master page property.
Hope this also helps.
Regards,
Steven Cheng
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)