Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 28th, 2008, 10:45 AM
Registered User
Join Date: Mar 2008
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default controlling asp:xml DocuementSource=

Please bare with me and my noobness.
Platform: Visual Web Developer 2008 Express
Page type: aspx (not using code behind)

I am building a site that displays data from a mssql datasource. As the user drills down to the detail levels they have the option to click a link to view an xml based report.

I am able to staticly point the xml control to an xml file, but what I really need to do is use a path supplied by the sql database and add the virtual directory to create the complete link.

I know how to pass the querystring data once the user clicks the datagrid link on the previous page. Is there a way to utilize this to build the path I need to display the correct xml?

I have been looking for a fix for over a week. It seems that I should be able to use the passed data in the XML control's DocumentSource= area.

This works right now. It is a static DocumentSource path.

<asp:Xml ID="Xml1" runat="server"

^^portion of the link in bold can be passed from the previous page.

What do I put in DocumentSource= to make it use the "ResultsLink" field from the prior page?
Reply With Quote
  #2 (permalink)  
Old April 3rd, 2008, 10:36 AM
Registered User
Join Date: Mar 2008
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts


I can now pass the entire xml file path as a string from the previous page. I just need to get the ASP:XML DocumentSource= to use the string. But, the control doesn't accept <% %> fields.

Can I build this programicly?
Reply With Quote
  #3 (permalink)  
Old April 14th, 2008, 07:21 AM
Registered User
Join Date: Mar 2008
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts

found the fix. i knew it was easy. special thanks to sachin_07 on asp.net forum.



My code looks like this...

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Me.Xml1.DocumentSource = Server.MapPath(Request.Item("link"))
    End Sub
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Controlling Alt+Ctrl+Del Keys through Asp.Net 2005 p330418 ASP.NET 2.0 Basics 5 February 13th, 2008 01:18 PM
xml invalid top level from ASP write XML(solution) g000we XML 0 August 9th, 2006 03:56 AM
Controlling Outgoing Custom XML Envelope Content RaminS Biztalk 1 June 12th, 2003 06:03 AM
XML, XML Schema, JavaScript, ASP cyberjames2003 XML 0 June 4th, 2003 04:49 AM

All times are GMT -4. The time now is 06:29 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.