HTML Button in Webservice

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sani723
    New Member
    • Feb 2007
    • 117

    HTML Button in Webservice

    i am using an HTML button having attribute runat="server" in the XSLT file in the webservice and then i want to call a function from code behind file onClick event of the Button. but i need to Initialize like this..

    private void InitializeCompo nent()
    {
    this.Button1.Se rverClick += new System.EventHan dler(this.Butto n1_ServerClick) ;
    this.Load += new System.EventHan dler(this.Page_ Load);

    }

    and also

    private void Button1_ServerC lick(object sender, System.EventArg s e)
    {
    Response.Write( "Good");
    }


    but i am using a class in Web Service so where i should put these two methods, so that Button can Write Good on Click.
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    Originally posted by sani723
    i am using an HTML button having attribute runat="server" in the XSLT file in the webservice and then i want to call a function from code behind file onClick event of the Button. but i need to Initialize like this..

    private void InitializeCompo nent()
    {
    this.Button1.Se rverClick += new System.EventHan dler(this.Butto n1_ServerClick) ;
    this.Load += new System.EventHan dler(this.Page_ Load);

    }

    and also

    private void Button1_ServerC lick(object sender, System.EventArg s e)
    {
    Response.Write( "Good");
    }


    but i am using a class in Web Service so where i should put these two methods, so that Button can Write Good on Click.
    I don't understand what you're trying to do.

    Web Services are not meant to handle things like "ButtonClic k" events...they are created to host business logic solutions to applications which should handle the button click.

    I don't know if what I'm saying makes sense so let me clarify.

    A Web Service holds a bunch of methods that do some computing and can be accessed on the web.

    Applications call the web methods in the Web Service. It is the application that handles the button click....not the Web Service.

    So, the Web Service only holds a bunch of methods and cannot handle events.

    Could you be more specific in what you're trying to do?

    -Frinny

    Comment

    Working...