ASP.NET String.Insert()

A super handy way to modify strings is the Insert() method. It comes in very handy when you are binding looped data to web controls with a populate method.

string yourString = "1000";
string yourEuroString = yourString.Insert(0, "€";);

Now you can use yourString as the value parameter for a dropdown and yourEuroString as the text parameter.

Resource: dotnetperls.com

Advertisements

Published by

Alan Feekery

Developer, Gamer, Musician, Cyclist and big Motorsport fan... enjoys the odd cup of coffee :)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s