Hi,
Try this code below... first drag and drop a button control in your webform. then copy paste this code below:
ok enjoy!!
private void Button1_Click(object sender, System.EventArgs e)
{
string txtInput = "ABCX123 DEFG111HIGK912";
string txt;
txt = "";
string c;
int P;
string o = "1234567890";
for (int i = 0; i < txtInput.Length ; i++)
{
c = txtInput.Substring(i,1);
P = o.IndexOf(c);
if (P < 0)
{
txt += c;
}
}
Response.Write(txt);
}
regards,
ruel sucgang
Can any one please suggest me how to remove numerics in a string of c#