This
http://www.dotnet-news.com/lien.aspx?ID=25702 is what I was looking
after.
Thanks.
"Elroyskimms" <> a écrit dans le message de news:
om...
On Sep 24, 1:00 pm, "Francois" <francois@corebridgecom> wrote:
> I plan a master page / content page design for next application.
>
> The master page would contain some standard button for my app. For
> instance
> a "Save" button. (present on all pages).
>
> But how can I call code in the content.cs page from the Save_Click in
> the
> master.cs page ?
>
> Thanks.
>
> François.
I work in VB so you'll have to find the C# equivalent but I think this
should work for you...
In the master.cs code Save_Click event handler, you should be able to
access controls in the content.cs file by:
me.findcontrol("MyControlName")
So, if the content to be saved is in a textbox, you should try (in
your master.cs file):
dim ContentTextBox as system.web.ui.webcontrols.textbox =
ctype(me.findcontrol("MyTextBox"), system.web.ui.webcontrols.textbox)
Now you should be able to access the contents of textbox using the
ContentTextBox.text
I'm also new to Master Pages so this may not be 100% accurate. If it
doesn't work, let me know.
-E