Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4253460
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T04:56:55+00:00 2026-05-21T04:56:55+00:00

Background: I have a winform application written in VB.NET that uses a WebService to

  • 0

Background: I have a winform application written in VB.NET that uses a WebService to send out different invitations to users based on the marketing company they select to take different interviews. The winform app is pulling string values from a variety of textboxes, listboxes, and dropdownlists to create some XML and push it to a web service called AcompServiceClient

Questions:

  • Is there a wizard or 3rd party application that will export winform data to webform asp.net or should I build an aspx page from scratch w/ the same namespaces for all the controls as the winform app?
  • Which files do I need to transport or setup to make this work besides the AcompServiceClient web service and the code-behind vb? (look at screenshot of the Project Files)
  • Do i have to copy over any parts of the app.config file and adapt it to the web.config file?

I was thinking:

  • I can start by copying the Acomp_Invitation_Form.vb to the AComp_Invitation_Web_App.aspx.vb code behind page.
  • Add existing webservice off the webserver
  • Manually re-add formatting, text boxes, list boxes, and drop down lists on the front end aspx page using the same names / id’s

Here’s a screenshot of the WinForm App:

ACOMP Screenshot

Here’s a screenshot of the Project Files:

enter image description here

Here’s my code on Acomp_Invitation_Form.vb:

Imports TestClient.aCompService
Imports System.Text
Public Class Form1

Private proxy As New AcompServiceClient
Private Sub stuff()

    Dim splitContractingBundle() As String
    splitContractingBundle = Split(cb2.SelectedItem, "|")
    Dim splitMarketingCompany() As String
    splitMarketingCompany = Split(cb3.SelectedItem, "|")
    Dim strDate As String = System.DateTime.Now.ToString
    Dim strOpData As String = String.Format("{0}~{1}~{2}~{3}~{4}~{5}~{6}~{7}~{8}~{9}~{10}",
                                            Trim(splitMarketingCompany(0)), txtFirstName.Text, "", txtLastName.Text,
                                            txtEmail.Text, txtEmail.Text, "1", strDate,
                                            "Pending", "1/1/1900", Trim(splitContractingBundle(0)))

    Dim int1 As Boolean = proxy.AddContractOpportunity(strOpData, "test", "test")
    txtEmail.Text = ""
    txtFirstName.Text = ""
    txtLastName.Text = ""
    lbCarriers.Items.Clear()
    cb2.Items.Clear()
    cb3.Items.Clear()
    cb2.SelectedItem = ""
    cb3.SelectedText = ""
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

    'TODO Add code to validate that all selections that are reaquired are met.
    'ccemail and the additional message are not required
    Dim firstname As String = txtFirstName.Text
    Dim lastname As String = txtLastName.Text
    Dim ccEmail As String = txtccEmail.Text
    Dim sb As New StringBuilder
    sb.AppendLine("<?xml version=""1.0"" encoding=""utf-8""?>")
    sb.AppendLine("<root>")
    sb.AppendLine("<MarketingCompany>")
    sb.AppendLine("<MarketingCompanyName>")
    ''Get Marketing Company Short Name
    Dim splitMC As String() = Split(cb3.SelectedItem, "|")
    Dim MCShort As String = Trim(splitMC(0))
    sb.AppendLine(String.Format("<MCNAme>{0}</MCNAme>", MCShort))
    'sb.AppendLine(String.Format("<MCNAme>{0}</MCNAme>", My.Settings.MarketingCompanyShortName))
    sb.AppendLine(String.Format("<ccEmail>{0}</ccEmail>", txtccEmail.Text))
    sb.AppendLine(String.Format("<emailMessage>{0}</emailMessage>", txtMessage.Text))
    sb.AppendLine(String.Format("<MarketerName>{0}</MarketerName>", txtMarketerName.Text))
    sb.AppendLine("<agent>")
    sb.AppendLine(String.Format("<FirstName>{0}</FirstName>", txtFirstName.Text))
    sb.AppendLine(String.Format("<LastName>{0}</LastName>", txtLastName.Text))
    sb.AppendLine(String.Format("<Email>{0}</Email>", txtEmail.Text))
    sb.AppendLine("<CRMGuid>123456</CRMGuid>")
    Dim spltBundles() As String

    For Each item In cb2.SelectedItems
        If Trim(item) <> "" Then
            spltBundles = Split(item, "|")
            sb.AppendLine("<ContractingOpportunity>")
            sb.AppendLine(String.Format("<Carrier>{0}</Carrier>", Trim(spltBundles(0))))
            sb.AppendLine(String.Format("<ContractingOpportunityName>{0}</ContractingOpportunityName>", Trim(spltBundles(1))))
            sb.AppendLine("</ContractingOpportunity>")
        End If
    Next
    sb.AppendLine("</agent>")
    sb.AppendLine("</MarketingCompanyName>")
    sb.AppendLine(" </MarketingCompany>")
    sb.AppendLine(" </root>")
    Dim xmlStr = sb.ToString
    Dim int1 As Boolean = proxy.AddContractOpportunity(xmlStr.ToString, "test", "test")
    MsgBox("Made It")
End Sub

Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    GetCarriers()
    GetMarketingCompanies()
End Sub

Private Sub GetCarriers()
    Try
        Dim ac1 As Array
        ac1 = proxy.GetCarrierNames("test", "test")

        For Each item In ac1
            lbCarriers.Items.Add(String.Format("{0} | {1} | {2}", item.CarrierID, item.CarrierNameLong, item.CarrierNameShort))

        Next
    Catch ex As Exception
        MsgBox(ex.Message)
    End Try

End Sub
Private Sub GetMarketingCompanies()
    Try
        Dim ac1 As Array
        ac1 = proxy.GetMarketingCompanyNames("test", "test")

        For Each item In ac1
            cb3.Items.Add(String.Format("{0}   |   {1}", item.MarketingCompanyShort, item.MarketingCompanyName))
        Next
    Catch ex As Exception
        MsgBox(ex.Message)
    End Try
End Sub

Private Sub lbCarriers_LostFocus(sender As Object, e As System.EventArgs) Handles lbCarriers.LostFocus
    Dim splt() As String
    Dim ac1 As Array
    cb2.Items.Clear()

    For Each item In lbCarriers.SelectedItems
        splt = Split(item, "|")
        ac1 = proxy.GetContractingBundles("test", "test", Trim(splt(0)))
        For Each Pitem In ac1
            cb2.Items.Add(Trim(splt(2)) & " | " & Pitem.FormBundleName)
        Next
    Next
End Sub
End Class
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T04:56:56+00:00Added an answer on May 21, 2026 at 4:56 am

    Yes, the way you want to do it is the way I have done this many times.

    Just copy the methods from your code behind and paste them into the code behind of your asp.net page. Some of your methods are not compatible because they are not supported in asp.net but you will find that our real quick when you build the project.

    Create your web page with the controls having exactly the same name as the ones in the winform. When you build, all you have to do is fix your errors and you are on your way.

    It looks like you are hooked up to some service so of course you will need to reference that.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Background: we have an application that generates reports from HTML (that may or may
Background I have an application written in native C++ over the course of several
Background: I have a kubuntu laptop right now that I can't use wirelessly, i.e.
I'm new to WPF and come from a WinForms background and have a fairly
Background: I have a little video playing app with a UI inspired by the
Background I have a massive db for a SharePoint site collection. It is 130GB
Background I have been asked by a client to create a picture of the
Background: I have a module which declares a number of instance methods module UsefulThings
Background I have made a Web Service in Visual Studio, and I'm trying to
Background: We have an offshore group working up a Silverlight 2 prototype for us.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.