ProductDetails details; // instantiate the details object, to load the information from the xml file. protected void Page_Load(object sender, EventArgs e) { string pid = Request.QueryString["pid"]; XmlDataSource1.XPath = "products/product[productId='" + pid + "']"; //parse to int //Int32.TryParse(pid, out pid_int); details = new ProductDetails(pid); XmlDocument doc = new XmlDocument(); doc.Load(Server.MapPath("Products.xml")); details.currentProduct = details.GetProductById(pid, doc); //Product Currentproduct = detGetProductById(pid); //System.Diagnostics.Debug.WriteLine(currentProduct.GetCategory()); XsltArgumentList xslArg = new XsltArgumentList(); xslArg.AddParam("product", "", "" + pid); //this.Xml1.TransformArgumentList = xslArg; }