Project Detail

Bind XML to Page Controls with ASP.NET/VB and XPATH  

Bind XML to Page Controls with ASP.NET/VB and XPATH is project number 324472
posted at Freelancer.com. Click here to post your own project.

 

| More Free Trial For New Buyers
 

Status:

Selected Providers: takasoft

Budget: $30-250

Created: 10/04/2008 at 18:23 EDT

Bid Count: 2

Average Bid:
$ 30

10/05/2008 at 18:23 EDT

Project Creator: napstulik
Employer Rating: 10/1010/1010/1010/1010/1010/1010/1010/1010/1010/10 (91 reviews)

Bid On This Project
 

Description

SUPER EASY PROJECT, should take less then an hour

I have an xml file with the following fields:
<pages>
<page url="page1">
<page_name>page 1</page_name>
<page_title>title 1</page_title>
<page_image>image1.jpg</page_image>
<page_text>text text, some more text</page_text>
<page>
<page url="page2">
<page_name>page 2</page_name>
<page_title>title 2</page_title>
<page_image>image2.jpg</page_image>
<page_text>text text, some more text 2</page_text>
<page>
</pages>

1. Needs to be scripted using XPATH to a page.aspx using ASP.NET/VB with codebehind
2. Script should check if @url exists, if yes bind controls, else display message "page not found"

3. Bind XML to page controls
<asp:Label ID="lblPageName" runat="server"></asp:Label>
<asp:Label ID="lblPageTitle" runat="server"></asp:Label>
<asp:Literal ID="ltImage" runat="server"></asp:Litera>
<asp:Label ID="lblPageText" runat="server"></asp:Label>

4. Create IF statement to check if xml node is empty for <page_image></page_image> and set ltImage.Vsible = false, otherwise display image inside literal control.

'complete this code:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
bind_page("page1")
End Sub
Protected Sub bind_page(ByVal strPage As String)
Shared xmlPage As System.Xml.XmlDocument
xmlPage = New System.Xml.XmlDocument
xmlPage.Load(Server.MapPath("~/App_Data/pages.xml"))
Dim NodeList As XmlNodeList = xmlCategories.SelectNodes("pages/page[@url='" & strPage & "']")
For Each Node As XmlNode In NodeList
lblPageName.Text = Node("page_name").InnerText
Next
End Sub

Maximum Budget $25
I Need it ASAP!

Messages Posted:1 View project clarification board Post message on project clarification board

Bid On This Project
 

If you are the project creator or one of the bidders Log In for more options

 

30

1 day

10-04-2008 19:35 EDT

I have done similar job. I can deliver within half an hour.

help

 

30

1 day

10-04-2008 19:03 EDT

Please see my ajax based samples

help


    Bid on this Project