2 Replies - 297 Views - Last Post: 25 January 2013 - 04:44 PM Rate Topic: -----

#1 Veteran  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 25-January 13

("TEXT") inside of a TextBox.

Posted 25 January 2013 - 04:20 PM

Hello, I'm trying to display some commands inside of a TextBox to other people. I'm using this textbox code:

TextBox1.Text = "("TEXT GOES HERE")"


It's giving me a "End of statement expected" error. Can anyone help me with this? It's probably just an easy fix.
Is This A Good Question/Topic? 0
  • +

Replies To: ("TEXT") inside of a TextBox.

#2 CodingSup3rnatur@l-360  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 991
  • View blog
  • Posts: 971
  • Joined: 30-September 10

Re: ("TEXT") inside of a TextBox.

Posted 25 January 2013 - 04:28 PM

Hi,

You need to escape the two double quotes inside the string, by prefixing them with double quotes:

TextBox1.Text = "(""TEXT GOES HERE"")"

Was This Post Helpful? 1
  • +
  • -

#3 Veteran  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 25-January 13

Re: ("TEXT") inside of a TextBox.

Posted 25 January 2013 - 04:44 PM

View PostCodingSup3rnatur@l-360, on 25 January 2013 - 04:28 PM, said:

Hi,

You need to escape the two double quotes inside the string, by prefixing them with double quotes:

TextBox1.Text = "(""TEXT GOES HERE"")"


Thanks so much! That worked. :innocent:
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1