Click here to Skip to main content
15,881,248 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
alright iam having some trouble with passing a variable as an argument to a method which requires constant input. Actually iam trying to implement this :

http://msdn.microsoft.com/en-us/library/aa905668.aspx[^]

the code in which iam having trouble is :


 <XmlRpcUrl(xmlrpcurl)> _
Public Interface IWP
        Inherits IXmlRpcProxy

        <xmlrpcmethod("metaweblog.getcategories")> _
         Function getCategories(ByVal args() As String) As category()

        <xmlrpcmethod("metaweblog.newpost")> _
          Function newPost(ByVal blogid As String, ByVal username As String, ByVal password As String, ByVal content As Post, ByVal publish As Boolean) As String

    End Interface



you see <xmlrpcurl()> needs a constant value, but i want to take the input from the user (a textbox maybe ?). But is shows an error saying that a constant variable is required.

does anybody have an idea of any workaround?

Also i know about interfaces. but what is the meaning of the first line (<xmlrpcurl()>) ?
Posted
Updated 4-Sep-10 19:25pm
v2
Comments
CS2011 6-Sep-10 22:52pm    
wrong tag dude..Tag it as VB.NET not C#

1 solution

Hi,

Maybe you can set the url in your implemented class.
I mean remove the first line and look for a way to set it dynamically.

also look at this:
http://code.google.com/p/xmlrpcnet/issues/detail?id=67[^]

Hope this can help you.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900