I am writing following code:
namespace WebApplication5
{
public partial class WebForm1 : System.Web.UI.Page
{
private DataSet dataset1 = new Data
You need to have a look at Asp.net page life cycle, In your code when you click on your button page is destroyed and re created again and whole life cycle is followed and in that process your ds(dataset) is recreated too, therefore output xml doesn't have any data in it. To maintain state of your dataset have a look at State Management in Asp.net