How to add reference when working without VS.Net and inline code

Discussion in 'ASP .Net Web Services' started by Sagar, Jul 1, 2008.

  1. Sagar

    Sagar Guest

    Hi,

    I am working on enhancing an aspx page. The server-side is written
    with inline code. The coding is not in VS.


    The task is to make calls a webservice http://company/vnwebservice/vnwebservice.asmx.
    The aspx page is not created in vs.net IDE but written through a text
    editor.


    The question is how do I add a web reference to the
    http://company/vnwebservice/vnwebservice.asmx and start calling the
    methods in the webservice.


    I understand I have to a add a directive. Should I add a Assembly
    directive or a Register directive ?


    Can someone help with a example ?


    <%@ Register TagPrefix="vw" TagName="vnwebservice.asmx"
    src="http://
    company/vnwebservice/vnwebservice.asmx" %>


    <%@ Assembly src="http://company/vnwebservice/vnwebservice.asmx" %>


    Thanks,
    Anand
     
    Sagar, Jul 1, 2008
    #1
    1. Advertisements

  2. Sagar

    Tanzim Saqib Guest

    On Jul 1, 9:16 pm, Sagar <> wrote:
    > Hi,
    >
    > I am working on enhancing an aspx page. The server-side is written
    > with inline code. The coding is not in VS.
    >
    > The task is to make calls a webservicehttp://company/vnwebservice/vnwebservice.asmx.
    > The aspx page is not created in vs.net IDE but written through a text
    > editor.
    >
    > The question is how do I add a web reference to thehttp://company/vnwebservice/vnwebservice.asmxand start calling the
    > methods in the webservice.
    >
    > I understand I have to a add a directive. Should I add a Assembly
    > directive or a Register directive ?
    >
    > Can someone help with a example ?
    >
    > <%@ Register TagPrefix="vw" TagName="vnwebservice.asmx"
    > src="http://
    > company/vnwebservice/vnwebservice.asmx" %>
    >
    > <%@ Assembly src="http://company/vnwebservice/vnwebservice.asmx" %>
    >
    > Thanks,
    > Anand




    Hey Anand

    Use wsdl tool from from Visual Studio Command prompt:

    wsdl /l:CS /n:MyProject /out:C:\source http://path/WebService.asmx

    Here you can see by this command you can generate the source code in
    C# that can invoke that WebService, MyProject is the namespace
    obvisouly you are flexible to change according to your need. By /out
    switch you can specify where the generated code would be stored in
    your hard disk.

    Now you can include this class file into your project and use as
    usual. Hope it helps.

    Tanzim Saqib
    http://www.TanzimSaqib.com
     
    Tanzim Saqib, Jul 2, 2008
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. babu dhayal via .NET 247

    How to add shared assembly in the add reference

    babu dhayal via .NET 247, Aug 5, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    6,599
    Nelson Xu
    Aug 17, 2004
  2. Peri
    Replies:
    2
    Views:
    3,177
  3. Abhi
    Replies:
    2
    Views:
    988
    E. Robert Tisdale
    Jul 3, 2003
  4. Robert H
    Replies:
    0
    Views:
    463
    Robert H
    Jul 26, 2006
  5. Sean
    Replies:
    4
    Views:
    897
    Rolf Magnus
    Apr 30, 2006
  6. Rahul
    Replies:
    3
    Views:
    626
    James Kanze
    Feb 28, 2008
  7. Deep Mehta via .NET 247
    Replies:
    2
    Views:
    672
    Dave A
    May 31, 2005
  8. Chris  Ashley

    Adding a web reference in code (without VS.Net) ?

    Chris Ashley, Nov 10, 2005, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    237
    Martin Kulov
    Nov 11, 2005
Loading...