Replace String from Text C# and VB.Net in ASP.Net

Last Reply 8 months ago By pandeyism

Posted 8 months ago

my text 

 Label1.Text= ("kjljk ;lkjlkj     (((((   jlkj;lkj lkjl;kj;lkj");

my need for remove   (((((

and Re Change use ppp

Help  C# asp net coding 

Posted 8 months ago Modified on 8 months ago

Hi tareq24bd,

Please refer below sample.

Code

C#

protected void Page_Load(object sender, EventArgs e)
{

    lblMessage.Text = ("kjljk ;lkjlkj     (((((   jlkj;lkj lkjl;kj;lkj").ToString().Replace("(((((", "ppp");
}

VB.Net

Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
    lblMessage.Text = ("kjljk ;lkjlkj     (((((   jlkj;lkj lkjl;kj;lkj").ToString().Replace("(((((", "ppp")
End Sub

Output

kjljk ;lkjlkj ppp jlkj;lkj lkjl;kj;lkj