Click here to Skip to main content
12,069,536 members (63,983 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: VB 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.5K

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 23-Apr-11 15:07pm
   
can u give me sample code for this to do ?
Nishant Sivakumar 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
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160208.1 | Last Updated 23 Apr 2011
Copyright © CodeProject, 1999-2016
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