• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 392
  • Last Modified:

response.Write("<form" syntax

I have an html form within a webform that I am creating dynamically as part of a bank card authorisation stage.

Im not very familliar with escape characters in c#. I need to convert the from VB to c# the following.
Please would someone start me off for the first line?
Should it be
Response.Write("<FORM name=\"\"form\"\" action=\"\"\" & strACSURL & \"\"\" method=\"\"POST\"\"
target=""3DIFrame\"\"/>")

Here is the code I want to convert.
Response.Write("<FORM name=""form"" action=""" & strACSURL & """ method=""POST"" target=""3DIFrame""/>")
    Response.Write("<input type=""hidden"" name=""PaReq"" value=""" & strPAReq & """/>")
    Response.Write("<input type=""hidden"" name=""TermUrl"" value=""" & strTermURL & """/>")
    Response.Write("<input type=""hidden"" name=""MD"" value=""" & strMD & """/>")
    Response.Write("<NOSCRIPT>")
    Response.Write("<center><p>Please click button below to Authenticate your card</p><input type=""submit"" value=""Go""/></p></center>")
    Response.Write("</NOSCRIPT>")
    Response.Write("</form>")
0
nigelstephens
Asked:
nigelstephens
  • 2
1 Solution
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
in VB, you use 2 double quotes inside a string.
in C#, you escape the double quote with @
Response.Write("<FORM name=\"form\" action=\"\" & strACSURL & \"\" method=\"POST\"
target=\"3DIFrame\" />")

Open in new window

0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
sorry...
Response.Write("<FORM name=\"form\" action=\"" + strACSURL + "\" method=\"POST\"
target=\"3DIFrame\" />")

Open in new window

0

Featured Post

Granular recovery for Microsoft Exchange

With Veeam Explorer for Microsoft Exchange you can choose the Exchange Servers and restore points you’re interested in, and Veeam Explorer will present the contents of those mailbox stores for browsing, searching and exporting.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now