471,330 Members | 1,041 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,330 software developers and data experts.

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

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

Dec 21 '05 #1
5 1013
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.

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Dec 21 '05 #2
Yea thats what i mean, but how do i collect the click event from the
(sub) controls on the main page ?

Thanks
Jeppe

Dec 21 '05 #3
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 )


--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

<je************@yahoo.se> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
Yea thats what i mean, but how do i collect the click event from the
(sub) controls on the main page ?

Thanks
Jeppe

Dec 21 '05 #4
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).

Dec 21 '05 #5
Hi,

<je************@yahoo.se> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
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.
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Dec 22 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by abcd | last post: by
3 posts views Thread by Mark | last post: by
10 posts views Thread by Bharat | last post: by
2 posts views Thread by rookiejavadude | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.