Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB.NET
hi all
 

in my project i have textbox in that textbox i may have values like "A1 A2 A3 A4 A5", i want remove the A3 value from that textbox please help me how to do or give me sample code
Posted 23-Apr-11 9:47am
sameertm1.4K

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Use String.Replace.
 
http://msdn.microsoft.com/en-us/library/system.string.replace.aspx[^]
 
[Update]
---------
 
In response to your comment asking for sample code, here's the coede snippet from the MSDN documentation I linked to above:
 
Imports System
 
Public Class ReplaceTest
 
    Public Shared Sub Main()
        Dim errString As String = "This docment uses 3 other docments to docment the docmentation"
 
        Console.WriteLine("The original string is:{0}'{1}'{0}", Environment.NewLine, errString)
 
        ' Correct the spelling of "document".
        Dim correctString As String = errString.Replace("docment", "document")
 
        Console.WriteLine("After correcting the string, the result is:{0}'{1}'", Environment.NewLine, correctString)
    End Sub
End Class
  Permalink  
v2
Comments
sameertm at 23-Apr-11 15:07pm
   
can u give me sample code for this to do ?
Nishant Sivakumar at 23-Apr-11 15:20pm
   
I've updated my answer.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 5,170
1 DamithSL 4,357
2 Maciej Los 3,750
3 Kornfeld Eliyahu Peter 3,470
4 Sergey Alexandrovich Kryukov 2,851


Advertise | Privacy | Mobile
Web04 | 2.8.141216.1 | Last Updated 23 Apr 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100