textBox

G

Guest

in C# for asp. i have a textbox, and at the point of doing an INSERT to my
table, it is cutting it off at the point where end users press Return (the
next line).

in other words, in a multiline textbox which allows up to 4000 characters,
if the end users presses a key to go to the next line it doesn't add the next
line to sql?

stringbuilder has my comments something like:
string myComments = "123456789 are my numbers/nBut here the line is broken"
/n is where it stops. i'm sure doing a replace for this will fix it, but is
there a better way?
 
P

Peter Rilling

How do you know it is cutting off your string? Are you looking at in in
Enterprise Manager or when your content renders?
 
G

Guest

Both.

In enterprise Mgr. i only get the first 16 characters. I did two changes
and it fixed it, i had the field type set as text with the default of 16.
that might of caused it, but I doubt it since it only had 4 characters at one
point.

it's corrected now, I changed the field to nvarchar from text in sql, and
with a stringbuilder used something like: strInput = Replace("\n", (" ")
and did another for the "\r". All is well.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top