Click here to Skip to main content
16,005,339 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Friendly/Vanity URLs Pin
eggsovereasy16-Aug-06 9:46
eggsovereasy16-Aug-06 9:46 
GeneralRe: Friendly/Vanity URLs Pin
Guy Harwood16-Aug-06 11:04
Guy Harwood16-Aug-06 11:04 
GeneralRe: Friendly/Vanity URLs Pin
Jesse Squire17-Aug-06 0:58
Jesse Squire17-Aug-06 0:58 
QuestionASP.net + MYSQL Security Pin
Naveed Kamboh16-Aug-06 6:19
Naveed Kamboh16-Aug-06 6:19 
QuestionDisplaying message(news) in client Browser Pin
meetbinu200316-Aug-06 6:14
meetbinu200316-Aug-06 6:14 
AnswerRe: Displaying message(news) in client Browser Pin
Mike Ellison16-Aug-06 6:18
Mike Ellison16-Aug-06 6:18 
AnswerRe: XmlDataSource Pin
Mike Ellison16-Aug-06 6:16
Mike Ellison16-Aug-06 6:16 
QuestionXPath position() function not working Pin
whozurmommy16-Aug-06 4:53
whozurmommy16-Aug-06 4:53 
I'm new to ASP.NET and with my first experiment I've run into a bunch XML problems. First I found out that the XMLDataSource control does not support namespaces. Now this. I'm trying to use the XPath position() function from within a DataList control. Here is my code:

<asp:DataList ID="DataList1" runat="server" DataSourceID="XmlDataSource1">
<ItemTemplate>
item # = <%# XPath("position()")%>. item price = <%# XPath("ele") %>
</ItemTemplate>
</asp:DataList>
<asp:XmlDataSource ID="XmlDataSource1" runat="server" DataFile="~/cleancrash.xml" XPath="gpx/trk/trkseg/trkpt">
</asp:XmlDataSource>

unfortunately when my code runs the position() function returns "1, 1, 1". I expect it to return the number from within the node set. In my case I have 3 nodes in my set, so I expect it to return, "1, 2, 3". I am attempting to produce a numbered list of items from within my XML file. My XPath command XPath("ele") works correctly, and the Datalist does see that my set has 3 items.

1. Is position() the correct function to be using?
2. How can I get the results I am looking for?
3. Can someone explain to me how to correctly read the XPathBinder documentation (http://msdn2.microsoft.com/en-us/library/system.web.ui.xpathbinder.aspx). I cannot figure out what syntax it is looking for. I'd love to be able to figure this out in the future.

Thanks, -=STZ=-
QuestionSession keeps throwing exception Pin
cyber-will16-Aug-06 4:04
cyber-will16-Aug-06 4:04 
AnswerRe: Session keeps throwing exception Pin
ToddHileHoffer16-Aug-06 4:26
ToddHileHoffer16-Aug-06 4:26 
GeneralRe: Session keeps throwing exception Pin
cyber-will16-Aug-06 4:37
cyber-will16-Aug-06 4:37 
QuestionHow to make dll in asp.net 2.0 project Pin
Phanindra Kumar16-Aug-06 3:14
Phanindra Kumar16-Aug-06 3:14 
AnswerRe: How to make dll in asp.net 2.0 project Pin
Jesse Squire16-Aug-06 3:21
Jesse Squire16-Aug-06 3:21 
QuestionDLLs, Global Variables, and Scope Pin
#realJSOP16-Aug-06 2:50
professional#realJSOP16-Aug-06 2:50 
AnswerRe: DLLs, Global Variables, and Scope Pin
Jesse Squire16-Aug-06 3:06
Jesse Squire16-Aug-06 3:06 
GeneralRe: DLLs, Global Variables, and Scope Pin
Suresh Pirsquare17-Aug-06 3:45
Suresh Pirsquare17-Aug-06 3:45 
AnswerRe: DLLs, Global Variables, and Scope [modified] Pin
ToddHileHoffer16-Aug-06 3:14
ToddHileHoffer16-Aug-06 3:14 
AnswerRe: DLLs, Global Variables, and Scope Pin
Paddy Boyd16-Aug-06 5:09
Paddy Boyd16-Aug-06 5:09 
Questionasp 2003->2005 Pin
locaas16-Aug-06 2:02
locaas16-Aug-06 2:02 
AnswerRe: asp 2003-&amp;amp;gt;2005 [modified] Pin
Alvin George16-Aug-06 2:34
Alvin George16-Aug-06 2:34 
Questioninsert data from excel sheet into sql server [modified] Pin
playout16-Aug-06 2:00
playout16-Aug-06 2:00 
AnswerRe: insert data from excel sheet into sql server Pin
Jesse Squire16-Aug-06 2:40
Jesse Squire16-Aug-06 2:40 
QuestionCan ASP.NET script and HTML server controls be placed in an XSL file? Pin
Red_Wizard_Shot_The_Food15-Aug-06 23:44
Red_Wizard_Shot_The_Food15-Aug-06 23:44 
QuestionMaster Page Pin
Kamal.Afridi15-Aug-06 23:43
Kamal.Afridi15-Aug-06 23:43 
AnswerRe: Master Page Pin
Guffa16-Aug-06 1:40
Guffa16-Aug-06 1:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.