• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 412
  • 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

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