Using Variables in XPath Expressions
I have a textBox that contains a string values. I need to take this string and use it as criteria for an XPath Expression. Here's what I have. Why isn't it working???
string s = textBox1.Text;
XPathExpression expr;
expr = myXPathNavigator.Compile("/NewDataSet/note[@to=$s]");
----Matt
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

kovanRank #1,453 · 1.1K reputationPosted Jan 28, 2004, 6:47 PM EST