Help needed, Call a save event from main page ??

  • Thread starter Thread starter jesper_lofgren
  • Start date Start date
J

jesper_lofgren

Hi,


I have a main page that contians some webcontrols.


On the main page i have a asp:button id="Save".
The thing is that i want to trigger a save event in all webcontrols
when i cklick on the asp:button on the main page.


Anyone have a idea how i can do this ?


Thanks
// Jeppe
 
Hi,

On the main page i have a asp:button id="Save".
The thing is that i want to trigger a save event in all webcontrols
when i cklick on the asp:button on the main page.


There is no such a thing as a "save" operation in the asp.net controls, you
can handle the click event of the save button and collect the info from the
controls and save it accordingly.
 
Yea thats what i mean, but how do i collect the click event from the
(sub) controls on the main page ?

Thanks
Jeppe
 
easy:


In the aspx page:

<asp:Button Runat="server" ID="MainBTN" OnClick="SortClicked"
Text="Accident" ></asp:Button>


in the cs file:

SortClicked( object sender, EventArgs e )
 
Thanks, but, i wanna catch the event in the webcontrols that are
included in the aspx page not in the codebehindfile for the aspx (main
page).
 
Hi,

Thanks, but, i wanna catch the event in the webcontrols that are
included in the aspx page not in the codebehindfile for the aspx (main
page).

not clear what you mean, the codebehind is where you should put all your
code to handle the interactions with the page, the page (what you declare in
the .aspx file) will be compiled at runtime as a class which inherit from
the one you declare in the codebehind ( .cs) file, so it will have access to
it.
 
Back
Top