There are many ways you can do this like using SubString(), or CharIndex() or Split().
You can use regular expression also
string str = "1.2.3";
pattern = @"(?<name>\d\.\d+?)";
m = Regex.Match(str, pattern, RegexOptions.IgnoreCase | RegexOptions.Compiled);
if (m.Success)
{
Response.Write("Name:" + m.Groups["name"].Value + "<br />");
}
</name>
Using Split
string[] s = str.Split('.');
if(s.Length >=2)
str = s[0] + "." + s[1];