473,289 Members | 1,959 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,289 software developers and data experts.

How to pass multiple values to web service in VB.net

I have created a form in VB.net, where on-click of a button multiple variables are passed to a web service. My code is as below :

Expand|Select|Wrap|Line Numbers
  1. Imports MySql.Data.MySqlClient
  2. Imports OutlookAddIn2.mantistest
  3. Dim QService As New MantisConnectPortTypeClient
  4.  
  5.  Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
  6.         Dim value1 As String
  7.         Dim value2 As String
  8.         Dim value3 As String
  9.         Dim value4 As String
  10.         Dim viewstate As String
  11.  
  12.  
  13.         value1 = Project_Name.SelectedItem.ToString()
  14.         value2 = ComboBox2.SelectedItem.ToString()
  15.         value3 = ComboBox3.SelectedItem.ToString()
  16.         value4 = TextBox4.Text
  17.         Dim s As String = String.Format("Value 1: {0}  value2 : {1} value3: {2} value4: {3}", value1, value2, value3, value4)
  18.         Windows.Forms.MessageBox.Show(s)
  19.  
  20.         TextBox1.Text = QService.mc_issue_add(username:="**", password:="**", issue:="view_state:{0} project{1}")
  21.  
  22.     End Sub
The input parameters of my web service are :
  1. Project
  2. Category
  3. Priority
  4. Status

When I try to put them in following ways I get the following errors :

Code : issue:=("Category:{0} project{1}",value1, value2)
Error : value1 saying that a named argument is expected.
Code : TextBox1.Text = QService.mc_issue_add(username:="**", password:="**", view_state:=value1, Project:=value2)
Error : Argument not specified for parameter issue of public function QService.mc_issue_add(Username as String, Password as String, issue as mantistest.Issuedata)As string

Where have I gone wrong? I have tried using other arguments with single input values and it works fine. Appreciate any assistance.
May 26 '16 #1
0 1327

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Raghavendra RAV | last post by:
Hi, Is it possible to pass mutiple values to xsl parameters ? Please guide me.. if any other alternative ways to achieve this, please inform.. Thanks, Raghu CSS India
4
by: cwwilly | last post by:
Hello, Thanks for taking a look at this! Problem: I'm trying to pass multiple dynamic values between a slaveform and a masterform. The problem I'm having is on the slaveform I loop through...
5
by: Homer Simpson | last post by:
Hi All, I'm trying to write a method where I pass three arguments and the method returns six values. All the values will be doubles. First, is it possible to get multiple values returned by a...
2
by: macyp | last post by:
I have to pass values from one aspx page to another. The controls I have in the first page are: a textbox, 3 drop down lists, and 2 check boxes, and a submit button. It is a search page, and the...
1
by: samir dsf | last post by:
hi i can send and retrieve a single value. but now i have around 3-4 values which i want to pass, from a link and receive in another page. here is how i am currently doing: Dim urlParams As...
1
by: dan_williams | last post by:
Is it possible to pass multiple discrete values to a report document so that I can export it to PDF? I've managed to perform the following code to display a Crystal Report Viewer ok, but i want...
2
by: erick-flores | last post by:
Hello all I have an ODBC in Access of 18 tables from a FoxPro application. I dupplicate the tables from the FoxPro application so I can use the tables (put together a database) and send them to...
3
by: shara | last post by:
Hello there, I want to pass multiple values selected in a select box(HTML) to another php page.I tried doing in several ways but of no use.Can anybody please help me with this. The code i used...
3
by: cubekid | last post by:
Dev't Tool: Visual C# 2003 and Javascript System Type: Web Application One requirement of the system is to dynamically create a table on client-side (Javascripting using createElement method.)...
0
by: Lee Hopkins | last post by:
i have a windows client that is on a remote computer. that is gathering info from that server. Date, date, number, string, string, string. I need to pass them to a web service to update a local...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...

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.