Replace string function in C# working in web forms but not win forms.
Posted on 2008-06-12
What am I missing here?
I have the following string:
string _node = Individual_Program__Serious_Incidents_Sorted_by_Incident_Report
I use the following C#
I am trying to replace the dash with an underscore. After the code executes, it is still a dash!!!
I reply back:
Heres your answer&
protected void Page_Load(object sender, EventArgs e)
Im not using ASP. This is in my code generator.
Its maddening& this doesnt work:
string _treeNode = ri.treeNodeName.Replace(" ", "_");
string_treeNode2 = _treeNode.Replace("-","_");
After that _treeNode2 still has the darn -.
I cant believe this is a bug&weird. Ive googled and no help.