This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DEVELOPERS FORUM - How do I get the value from a formatted text field?

andherrm - Tuesday, August 18, 2009 10:29 AM:

Hi all!

I created a method, there I want to get the "pure" value from a formatted textfield:

string req_rm_text = this.getProperty("req_rm_text"); //this property is the formatted text field!

req_rm_intro = req_rm_text.ToString();   
intro_length = req_rm_text.Length;

  if (intro_length < 150)
  {
     req_rm_intro = req_rm_intro.ToString();
  }
  else
  {
     req_rm_intro = req_rm_intro.Substring(1,150);
  }

this.setProperty("req_rm_intro", req_rm_intro);

The formatted text field contains the text "xxxx", but the length is 88 (!)

The method returns following error:

String or binary data would be truncated. The statement has been terminated.String or binary data would be truncated. The statement has been terminated.

Help is appreciated!

Thanks!

AndHerrm