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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jesper_lofgren@yahoo.se

    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

  • Ignacio Machin \( .NET/ C# MVP \)

    #2
    Re: Help needed, Call a save event from main page ??

    Hi,

    [color=blue]
    > 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.[/color]


    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


    Comment

    • jesper_lofgren@yahoo.se

      #3
      Re: Help needed, Call a save event from main page ??

      Yea thats what i mean, but how do i collect the click event from the
      (sub) controls on the main page ?

      Thanks
      Jeppe

      Comment

      • Ignacio Machin \( .NET/ C# MVP \)

        #4
        Re: Help needed, Call a save event from main page ??

        easy:


        In the aspx page:

        <asp:Button Runat="server" ID="MainBTN" OnClick="SortCl icked"
        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

        <jesper_lofgren @yahoo.se> wrote in message
        news:1135178233 .613676.249800@ g44g2000cwa.goo glegroups.com.. .[color=blue]
        > Yea thats what i mean, but how do i collect the click event from the
        > (sub) controls on the main page ?
        >
        > Thanks
        > Jeppe
        >[/color]


        Comment

        • jesper_lofgren@yahoo.se

          #5
          Re: Help needed, Call a save event from main page ??

          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).

          Comment

          • Ignacio Machin \( .NET/ C# MVP \)

            #6
            Re: Help needed, Call a save event from main page ??

            Hi,

            <jesper_lofgren @yahoo.se> wrote in message
            news:1135199404 .951039.132900@ g43g2000cwa.goo glegroups.com.. .[color=blue]
            > 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).[/color]

            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


            Comment

            Working...