Hi firoz1986,
As per you query i have created one sample.Please refer the below sample.If you have any doubt please revert me back.
Code:
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
char[] options = new char[] { ' ', '+', '*', '/', '?', '|' };
string outputstring = GetTitle("This is test+example of*replace/of?multiple|string.", options);
Response.Write(outputstring);
}
}
protected string GetTitle(object obj, char[] options)
{
foreach (char o in options)
{
obj = obj.ToString().Replace(o, '-');
}
return obj.ToString();
}