473,500 Members | 1,605 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Converting C# Attribute to VB.net for WSE demo (ServiceStation)

http://msdn.microsoft.com/msdnmag/is...erviceStation/

In the downloadable code (not the article itself) for this great article
about WSE Security, Aaron Skonnard has the following C# method ...

[WebMethod]
[return:XmlElement("WeblogEntry")]
public ConfirmedWeblogEntry AddEntry( NewWeblogEntry newEntry )
{
}

I am trying to convert this demo to VB.Net and having no luck at all with
the attribute
[return:XmlElement("WeblogEntry")]

Any ideas anyone ?
Nov 23 '05 #1
3 4234
Hi Adam,

This is the VB.NET version of that C# code

<WebMethod()> _
<return: XmlElement("WeblogEntry")> _
Public Function AddEntry(ByVal newEntry As NewWeblogEntry) As ConfirmedWeblogEntry
End Function

HTH

Mona
"Adam Stephensen" <Adam St********@discussions.microsoft.com> wrote in message news:C8**********************************@microsof t.com...
http://msdn.microsoft.com/msdnmag/is...erviceStation/

In the downloadable code (not the article itself) for this great article
about WSE Security, Aaron Skonnard has the following C# method ...

[WebMethod]
[return:XmlElement("WeblogEntry")]
public ConfirmedWeblogEntry AddEntry( NewWeblogEntry newEntry )
{
}

I am trying to convert this demo to VB.Net and having no luck at all with
the attribute
[return:XmlElement("WeblogEntry")]

Any ideas anyone ?

Nov 23 '05 #2
Thanks Mona,

I had tried your suggestion of

<WebMethod()> _
<return: XmlElement("WeblogEntry")> _
Public Function AddEntry(ByVal newEntry As NewWeblogEntry) As
ConfirmedWeblogEntry
End Function
but the '<' sign before "return" then gives the following intellisense error

"Attribute specifier is not a complete statement. Use a line continuation to
apply the attribute to the following statement."
I have also tried..

<WebMethod(),return: XmlElement("WeblogEntry")> _
Public Function AddEntry(ByVal newEntry As NewWeblogEntry) As
ConfirmedWeblogEntry
End Function

but then 'return' has an intelisense error of "Keyword is not valid as an
identifier"
I have googled like a madman, but cannot find any documentation on using
"return" as a method attribute...
though it obviously works... because the c# project is excellent

thanks heaps for your help.

Any other suggestions ? Anyone ?

"Mona" wrote:
Hi Adam,

This is the VB.NET version of that C# code

<WebMethod()> _
<return: XmlElement("WeblogEntry")> _
Public Function AddEntry(ByVal newEntry As NewWeblogEntry) As ConfirmedWeblogEntry
End Function

HTH

Mona
"Adam Stephensen" <Adam St********@discussions.microsoft.com> wrote in message news:C8**********************************@microsof t.com...
http://msdn.microsoft.com/msdnmag/is...erviceStation/

In the downloadable code (not the article itself) for this great article
about WSE Security, Aaron Skonnard has the following C# method ...

[WebMethod]
[return:XmlElement("WeblogEntry")]
public ConfirmedWeblogEntry AddEntry( NewWeblogEntry newEntry )
{
}

I am trying to convert this demo to VB.Net and having no luck at all with
the attribute
[return:XmlElement("WeblogEntry")]

Any ideas anyone ?

Nov 23 '05 #3
This might work:

<WebMethod, return: XmlElement("WeblogEntry")> _

"Adam Stephensen" <Ad************@discussions.microsoft.com> wrote in
message news:3C**********************************@microsof t.com...
Thanks Mona,

I had tried your suggestion of

<WebMethod()> _
<return: XmlElement("WeblogEntry")> _
Public Function AddEntry(ByVal newEntry As NewWeblogEntry) As
ConfirmedWeblogEntry
End Function
but the '<' sign before "return" then gives the following intellisense error
"Attribute specifier is not a complete statement. Use a line continuation to apply the attribute to the following statement."
I have also tried..

<WebMethod(),return: XmlElement("WeblogEntry")> _
Public Function AddEntry(ByVal newEntry As NewWeblogEntry) As
ConfirmedWeblogEntry
End Function

but then 'return' has an intelisense error of "Keyword is not valid as an
identifier"
I have googled like a madman, but cannot find any documentation on using
"return" as a method attribute...
though it obviously works... because the c# project is excellent

thanks heaps for your help.

Any other suggestions ? Anyone ?

"Mona" wrote:
Hi Adam,

This is the VB.NET version of that C# code

<WebMethod()> _
<return: XmlElement("WeblogEntry")> _
Public Function AddEntry(ByVal newEntry As NewWeblogEntry) As ConfirmedWeblogEntry
End Function

HTH

Mona
"Adam Stephensen" <Adam St********@discussions.microsoft.com> wrote in

message news:C8**********************************@microsof t.com...
http://msdn.microsoft.com/msdnmag/is...erviceStation/

In the downloadable code (not the article itself) for this great article about WSE Security, Aaron Skonnard has the following C# method ...

[WebMethod]
[return:XmlElement("WeblogEntry")]
public ConfirmedWeblogEntry AddEntry( NewWeblogEntry newEntry )
{
}

I am trying to convert this demo to VB.Net and having no luck at all with the attribute
[return:XmlElement("WeblogEntry")]

Any ideas anyone ?

Nov 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1923
by: Peter Otten | last post by:
There is currently a discussion on python-dev about an extract() function which offers fast access to list items and object attributes. It could serve, e. g., as the key argument of the future...
7
3638
by: svilen | last post by:
hello again. i'm now into using python instead of another language(s) for describing structures of data, including names, structure, type-checks, conversions, value-validations, metadata etc....
2
3381
by: nanookfan | last post by:
Hi all, I'm having a bizarre problem converting XML files to HTML using an XSLT. The problem is only occuring in my Netscape 7.0 browser. What makes it more bizarre is that it is only...
2
2838
by: mike | last post by:
regards: I follow the following steps to converting from HTML to XHTML http://webpageworkshop.co.uk/main/xhtml_converting My parser is http://htmlparser.sourceforge.net/ Xhtml version is 1.0...
5
2785
by: Howard Kaikow | last post by:
I'm converting some C# to VB .NET. In an example that uses Outlook, I find the following C# statement: Outlook.AppointmentItem appointment = (Outlook.AppointmentItem)outlook.CreateItem(...
4
6326
by: Dabbler | last post by:
I'm trying to block out some text by setting Label width attribute which renders as a span tag so that all labels for textfields take up the same amount of space hence the textfields are all...
3
14884
by: Reinhold Schrecker | last post by:
Hi there, I am trying to generate a dynamic menu with JavaScript/DOM and have problems to set the onclick-attribute for my <a>-elements. The following code works fine in Opera and Mozilla but...
1
1023
by: Stedak | last post by:
We have a WinForm application that we would like to add security to. We would also like to set up a configuration utility that would make it easier to assign or remove rights. When using code...
5
2302
by: k.vanderstarren | last post by:
Hi All, I'm trying to convert some ASP.NET code that I found at http://weblogs.asp.net/dannychen/archive/2005/12/02/432190.aspx from VB to C#. I've managed to convert the portion that is in...
0
7134
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7014
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7229
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7395
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4921
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4609
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1429
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
667
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
311
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.