How to use substring

Hi All,

This is the code for, How we use the Substring.


if (rssurl.Length > 200)
{
label.Text = rssurl.Substring(0, 200) + "...".ToString();
}


In this code am using the following scenario I need to bind the URL's in a Datagrid. All of u know the URL's doesnt contains Empty spaces. So if we bind that values directly to the Grid, It could affect the appearance of the grid. So that we can use substring.

Thanks,
Saravanan.R


Comments

No responses found. Be the first to comment...


  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: