.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Code Snippets >> ASP.NET Controls >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

String builder

Posted By:Gowthammanju       Posted Date: July 31, 2011    Points: 40    Category: ASP.NET Controls    URL: http://www.dotnetspark.com  

This code explains about the developing the string builder in dotnet
 

here it is as


Add one listbox on your webform and add three items on design mode.

protected void Page_Load(object sender, EventArgs e)
{
StringBuilder builder = new StringBuilder();
for (int i = 0; i < array =" new" x =" this.ListBox1.Items[i].ToString();"> 0)
{
if ((builder.Length) != (ListBox1.Items.Count))
{

builder.Append(",");
// x += ",";
}
}

// Response.Write(builder);

}
string s = builder.ToString();
s = s.Substring(0, s.Length - 1);
Response.Write(s);
}


     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend