Translation from C# to VB.NET??

  • Thread starter Thread starter Rich Wallace
  • Start date Start date
R

Rich Wallace

Can anyone translate this to VB.NET code please?

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace test
{
public class WebForm1 : System.Web.UI.Page
{
protected System.Web.UI.WebControls.Label lblPJID;
protected System.Web.UI.WebControls.Label lblPLID;
protected System.Web.UI.WebControls.Label lblPOID;

private void Page_Load(object sender, System.EventArgs e)
{
com.jfshea.webservices.SheaGateway wsTest = new
test.com.jfshea.webservices.SheaGateway();
com.jfshea.webservices.DataGetPlanInfoByJDEPlanID returnedData =
wsTest.GetPlanInfoByJDEPlanID(" 3252350000", "bx", "003x");
lblPJID.Text = "PJID=: " + returnedData.Diagnostics.ErrorCode;
lblPLID.Text = "PLID=: " +
returnedData.Diagnostics.ErrorDescription;
lblPOID.Text = "POID=: " + returnedData.Diagnostics.Date;
}
}
}
 
Hello,

Craig said:
this "should" work ... haven't tested.. just did language
changes..

Mhmmm. I am not able to see the VB .NET code...

Regards,
Herfried K. Wagner
 
That's actually incorrect, here it is (translated by yours truly):

Imports System
Imports System.Collections
Imports System.ComponentModel
Imports System.Data
Imports System.Drawing
Imports System.Web
Imports System.Web.SessionState
Imports System.UI
Imports System.UI.WebControls
Imports System.UI.HtmlControls

Namespace Test
Public Class WebForm1
Inherits System.Web.UI.Page

Protected lblPJID As Label
Protected lblPLID As Label
Protected LBLPOID As Label

Private Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim wsTest As com.jfshea.webservices.SheaGateway
Dim returnedData As
com.jfshea.webservices.DataGetPlanInfoByJDEPlanID =
wsTest.GetPlanInfoByJDEPlanID(" 3252350000", "bx", "003x")

lblPJID.Text = "PJID=" & returnedData.Diagnostics.ErrorCode
lblPLID.Text = "PLID=" &
returnedData.Diagnostics.ErrorDescription
lblPOID.Text = "POID=" & returnedData.Diagnostics.Date;
End Sub
End Class
End Namespace
private sub Page_Load(sender as object, e as
System.EventArgs)
{
dim wsTest as
com.jfshea.webservices.SheaGateway = new
test.com.jfshea.webservices.SheaGateway();
dim returnedData as
com.jfshea.webservices.DataGetPlanInfoByJDEPlanID =
wsTest.GetPlanInfoByJDEPlanID(" 3252350000", "bx", "003x");
lblPJID.Text = "PJID=: " +
returnedData.Diagnostics.ErrorCode
lblPLID.Text = "PLID=: " +
returnedData.Diagnostics.ErrorDescription;
lblPOID.Text = "POID=: " +
returnedData.Diagnostics.Date
}
}
}

--
Happy to help,
-- Tom Spink
([email protected])

"Go down with your server"

http://dotnetx.betasafe.com >> On The Mend

Please respond to the newsgroup,
so all can benefit
 
Thank you all for the replies, everything is working great now. I'll check
out the converters you mentioned HKW.

Thanks again.
 
Back
Top