Author: drmacy | Posted on: 10/30/2009 4:22:19 PM | Views : 902

I have several different master pages that my pages reference. In the Page_Load event handler for each of those pages, I need to reference several text boxes, as follows:
TextBox1 = CType(Me.FindControl("MyUserControl").FindControl("MyTextBox"), TextBox)
Since I have several of these statements and they need to be in each of the master page code-behind files, I want to put them in a separate class module as a public shared function and then reference that function in each code-behind file. The problem is I don't know how to pass a parameter to the function for "Me" since each master page has a different class name. I don't know how to generically refer to the master page in the function. I hope I'm being clear enough that someone can help me. Thanks!

...

Go to the complete details ...