Hi,
Try this code:
string xpath = "//("/Photos/Photo[@ID =$ID]";
XPathExpression expr = DynamicContext.Compile(xpath);
OR
//Run-time
DynamicContext ctx = new DynamicContext();
ctx.AddVariable("ID", txtID.Text);
expr.SetContext(ctx);
XPathNodeIterator custData = customers.Select(expr);
ref:http://weblogs.asp.net/cazzu/archive/2003/10/07/30888.aspx

Signature
Hope this helps.
Thanks and Regards.
Manish Bafna.
MCP and MCTS.
> Hi i posted this on the dotnet xml group but that group does not get much
> traffic so i thought to post here.
[quoted text clipped - 47 lines]
>
> </Photos>
Showjumper - 25 Jul 2007 14:27 GMT
Thanks but i am still unclear on how to use this. Also i think part of my
issue is how to do i set the datakeyfield of the datalist so that i can get
this ID and pass it into my update sub.
Ashok
> Hi,
> Try this code:
[quoted text clipped - 68 lines]
>>
>> </Photos>