Results 1 to 2 of 2

Thread: Client to Server function call...

  1. #1

    Thread Starter
    Hyperactive Member vbud's Avatar
    Join Date
    Jan 2002
    Location
    Mru 20 17S, 57 33E Goal: Get out of the BOX Status: In The Shadows!!! Target Posts: 3,000,000,000
    Posts
    378

    Unhappy Client to Server function call...

    hi

    could somebody please tell me if it is possible to call a function defined in a codebehind vb file from client side script..? Alternatively, I have a datagrid to which I am adding 2 ButtonColumns at run time. I need to implement the click event of these ButtonColumns. Actually I am using the Datagrid's onItemCommand to fire a Sub that will then determine, according to the button's CommandName what procedure to call. Only that my procedures are on server side(i.e in the codebehind vb file) and I can't find a way to call them.

    Any help would be much appreciated

    thanx.
    >!v!<
    Free your mind, stop thinking
    http://inspirone.blogspot.com

    Please rate this post if it helped you

  2. #2
    Hyperactive Member
    Join Date
    Jan 2003
    Location
    Cape Cod, US
    Posts
    292
    Perhaps I'm missing something but you should be able to create an event handler for each of your button columns and not need to go to the trouble you are describing.


    PHP Code:
    Private Sub DataGrid1_UpdateCommand(ByVal source As System.ObjectByVal e As System.Web.UI.WebControls.DataGridCommandEventArgsHandles DataGrid1.UpdateCommand

    ...Update Stuff...

    End Sub

    Private Sub DataGrid1_CancelCommand(ByVal source As System.ObjectByVal e As System.Web.UI.WebControls.DataGridCommandEventArgsHandles DataGrid1.CancelCommand
            Datagrid1
    .EditItemIndex = -1
            BindGrid
    ()
    End Sub 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width