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

rated by 0 users
This post has 0 Replies | 0 Followers

Top 200 Contributor
Posts 6
Points 55
andherrm Posted: Tue, Aug 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


 

Page 1 of 1 (1 items) | RSS