Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
DotNet
acad.assignment.mngr
academic
adonet
aspnet
aspnet.announcements
aspnet.build.controls
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
clr
compactframework
component_services
datatools
distributed_apps
drawing
faqs
framework
framework.wmi
general
internationalization
interop
languages.csharp
languages.jscript
languages.vb
languages.vb.controls
languages.vb.data
languages.vb.upgrade
languages.vc
languages.vc.libraries
myservices
odbcnet
performance
remoting
scripting
sdk
security
setup
vjsharp
vsa
webservi.enhancements
webservices
windowsforms
windowsforms.controls
winforms.databinding
winforms.designtime
xml
  
 
date: Mon, 30 Jun 2008 21:17:32 -0700 (PDT),    group: microsoft.public.dotnet.framework.webservices        back       


How to add webreference in aspx inline code   
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
date: Mon, 30 Jun 2008 21:17:32 -0700 (PDT)   author:   Sagar

Re: How to add webreference in aspx inline code   
On Jul 1, 10:17 am, 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
date: Wed, 2 Jul 2008 01:28:19 -0700 (PDT)   author:   Tanzim Saqib

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us