vb to c# converter is not working here . plz help me.
it is the vb code of retrun url from ebs payment gateway .but i using c# . please help me to convert this code in c#.
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
Dim sQS As String
Dim aQs() As String
Dim lsDetail As String
Dim lsDetail1 As String
Dim lsDetail2 As String
Dim pwd As String = "ebskey"
Dim DR As String = Request.QueryString("DR").ToString()
DR = DR.Replace(" "c, "+"c)
sQS = Base64Decode(DR)
' DR = RC4.Decrypt(pwd, sQS, False)
lsDetail &= "<table align='center' width='600' cellpadding='2' cellspacing='2' border='0'>"
lsDetail &= "<tr><th width='90%'><h2 class='co'>EBS Payment Integration Page</h2></th></tr></table>"
lsDetail &= "<center><h3>Response</H3></center>"
lsDetail &= "<table align='center' width='600' cellpadding='2' cellspacing='2' border='0'>"
lsDetail &= "<tr><th colspan='2'>Transaction Details</th></tr></table>"
Response.Write(lsDetail)
aQs = DR.Split("&"c)
For Each param As String In aQs
Dim aParam As Array = param.Split("="c)
shambhu shar...
Member
2 Points
11 Posts
convert vb.net code to c# asp.net
Dec 31, 2012 06:17 AM|LINK
vb to c# converter is not working here . plz help me.
it is the vb code of retrun url from ebs payment gateway .but i using c# . please help me to convert this code in c#.
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
Dim sQS As String
Dim aQs() As String
Dim lsDetail As String
Dim lsDetail1 As String
Dim lsDetail2 As String
Dim pwd As String = "ebskey"
Dim DR As String = Request.QueryString("DR").ToString()
DR = DR.Replace(" "c, "+"c)
sQS = Base64Decode(DR)
' DR = RC4.Decrypt(pwd, sQS, False)
lsDetail &= "<table align='center' width='600' cellpadding='2' cellspacing='2' border='0'>"
lsDetail &= "<tr><th width='90%'><h2 class='co'>EBS Payment Integration Page</h2></th></tr></table>"
lsDetail &= "<center><h3>Response</H3></center>"
lsDetail &= "<table align='center' width='600' cellpadding='2' cellspacing='2' border='0'>"
lsDetail &= "<tr><th colspan='2'>Transaction Details</th></tr></table>"
Response.Write(lsDetail)
aQs = DR.Split("&"c)
For Each param As String In aQs
Dim aParam As Array = param.Split("="c)
lsDetail1 &= "<table align='center' width='600' cellpadding='2' cellspacing='2' border='0'>"
lsDetail1 &= "<td align='left'>" + aParam(0) + "</td></br>"
lsDetail2 &= "<td align='left' width='50%'>" + aParam(1) + "</td>"
lsDetail2 &= "</tr></table>"
lsDetail1 &= lsDetail2
Response.Write(lsDetail1)
lsDetail1 = ""
lsDetail2 = ""
Next
End Sub
sameer_khanj...
Contributor
7066 Points
1381 Posts
Re: convert vb.net code to c# asp.net
Dec 31, 2012 06:33 AM|LINK
http://www.developerfusion.com/tools/convert/csharp-to-vb/
http://converter.telerik.com/
protected void // ERROR: Handles clauses are not supported in C# Page_Load(object sender, EventArgs e) { string sQS = null; string[] aQs = null; string lsDetail = null; string lsDetail1 = null; string lsDetail2 = null; string pwd = "ebskey"; string DR = Request.QueryString("DR").ToString(); DR = DR.Replace(' ', '+'); sQS = Base64Decode(DR); // DR = RC4.Decrypt(pwd, sQS, False) lsDetail += "<table align='center' width='600' cellpadding='2' cellspacing='2' border='0'>"; lsDetail += "<tr><th width='90%'><h2 class='co'>EBS Payment Integration Page</h2></th></tr></table>"; lsDetail += "<center><h3>Response</H3></center>"; lsDetail += "<table align='center' width='600' cellpadding='2' cellspacing='2' border='0'>"; lsDetail += "<tr><th colspan='2'>Transaction Details</th></tr></table>"; Response.Write(lsDetail); aQs = DR.Split('&'); foreach (string param in aQs) { Array aParam = param.Split('='); lsDetail1 += "<table align='center' width='600' cellpadding='2' cellspacing='2' border='0'>"; lsDetail1 += "<td align='left'>" + aParam(0) + "</td></br>"; lsDetail2 += "<td align='left' width='50%'>" + aParam(1) + "</td>"; lsDetail2 += "</tr></table>"; lsDetail1 += lsDetail2; Response.Write(lsDetail1); lsDetail1 = ""; lsDetail2 = ""; } }sameer.khanjit@gmail.com
View Blog
Click "Mark as Answer" on the post that helped you.
shambhu shar...
Member
2 Points
11 Posts
Re: convert vb.net code to c# asp.net
Dec 31, 2012 07:43 AM|LINK
Your code is getting error dear. plz reactify it.
Message: CS0118: 'aParam' is a 'variable' but is used like a 'method'
Source Error:
Line 38: lsDetail1 += "<table align='center' width='600' cellpadding='2' cellspacing='2' border='0'>"; Line 39: Line 40: lsDetail1 += "<td align='left'>" + aParam(0) + "</td></br>"; Line 41: Line 42: lsDetail2 += "<td align='left' width='50%'>" + aParam(1)+ "</td>";<div></div>sameer_khanj...
Contributor
7066 Points
1381 Posts
Re: convert vb.net code to c# asp.net
Dec 31, 2012 07:50 AM|LINK
protected void // ERROR: Handles clauses are not supported in C# Page_Load(object sender, EventArgs e) { string sQS = null; string[] aQs = null; string lsDetail = null; string lsDetail1 = null; string lsDetail2 = null; string pwd = "ebskey"; string DR = Request.QueryString("DR").ToString(); DR = DR.Replace(' ', '+'); sQS = Base64Decode(DR); // DR = RC4.Decrypt(pwd, sQS, False) lsDetail += "<table align='center' width='600' cellpadding='2' cellspacing='2' border='0'>"; lsDetail += "<tr><th width='90%'><h2 class='co'>EBS Payment Integration Page</h2></th></tr></table>"; lsDetail += "<center><h3>Response</H3></center>"; lsDetail += "<table align='center' width='600' cellpadding='2' cellspacing='2' border='0'>"; lsDetail += "<tr><th colspan='2'>Transaction Details</th></tr></table>"; Response.Write(lsDetail); aQs = DR.Split('&'); foreach (string param in aQs) { Array aParam = param.Split('='); lsDetail1 += "<table align='center' width='600' cellpadding='2' cellspacing='2' border='0'>"; lsDetail1 += "<td align='left'>" + aParam[0] + "</td></br>"; lsDetail2 += "<td align='left' width='50%'>" + aParam[1] + "</td>"; lsDetail2 += "</tr></table>"; lsDetail1 += lsDetail2; Response.Write(lsDetail1); lsDetail1 = ""; lsDetail2 = ""; } }sameer.khanjit@gmail.com
View Blog
Click "Mark as Answer" on the post that helped you.
dotnetpuyal
Member
22 Points
14 Posts
Re: convert vb.net code to c# asp.net
Dec 31, 2012 07:56 AM|LINK
prabu.raveen...
Contributor
5022 Points
956 Posts
Re: convert vb.net code to c# asp.net
Dec 31, 2012 08:16 AM|LINK
Find the Converted code below,
protected void Page_Load(object sender, EventArgs e)
{
string sQS = null;
string[] aQs = null;
string lsDetail = null;
string lsDetail1 = null;
string lsDetail2 = null;
string pwd = "ebskey";
string DR = Request.QueryString["DR"].ToString();
DR = DR.Replace(' ', '+');
sQS = Base64Decode(DR);
// DR = RC4.Decrypt(pwd, sQS, False)
lsDetail += "<table align='center' width='600' cellpadding='2' cellspacing='2' border='0'>";
lsDetail += "<tr><th width='90%'><h2 class='co'>EBS Payment Integration Page</h2></th></tr></table>";
lsDetail += "<center><h3>Response</H3></center>";
lsDetail += "<table align='center' width='600' cellpadding='2' cellspacing='2' border='0'>";
lsDetail += "<tr><th colspan='2'>Transaction Details</th></tr></table>";
Response.Write(lsDetail);
aQs = DR.Split('&');
foreach (string param in aQs)
{
Array aParam = param.Split('=');
lsDetail1 += "<table align='center' width='600' cellpadding='2' cellspacing='2' border='0'>";
lsDetail1 += "<td align='left'>" + aParam.GetValue(0) + "</td></br>";
lsDetail2 += "<td align='left' width='50%'>" + aParam.GetValue(1) + "</td>";
lsDetail2 += "</tr></table>";
lsDetail1 += lsDetail2;
Response.Write(lsDetail1);
lsDetail1 = "";
lsDetail2 = "";
}
}