Server Side XML export

10 replies. Last post: October 22, 2009 7:29 AM by John Bonin
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback
John BoninMember

Hi,

On a form I have a webGrid that is populated with the WebGrid_InitalizeDataSource event.  There is also a button that when the user clicks on will export the data in the Grid to an XML file.  The export is being done server side with this line:

 

Dim file As String = WebGrid1.ExportGrid(New ISNet.WebUI.WebGrid.DynARInfo("xml", Server.MapPath(fn), fname)) ' export grid data

 

When the button is clicked on the above line of code give this error: 
                 "Object reference not set to an instance of an object."

If I change the xml to pdf, excel or text, it works.  If I click on the Export Grid Icon on the botton of the grid and select XML it works.

Now I have another page with the same setup, except the Gird is bound to an ISDataSource and is Hieracheal and the above line of code works.

So can't I export to an XML file server side without using an ISDataSource, if so how?  I am using the server side becuase I need to create the file without streaming it to the user as the file is used for another process behind the scenes.

Thanks

John

 

All times are GMT -5. The time now is 12:28 AM.
Previous Next