Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using System.Data;
- using System.Xml;
- namespace WebApplication3
- {
- public partial class _Default : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
- {
- prikaziXmlPodatke();
- }
- private void prikaziXmlPodatke()
- {
- string xmlfajl = HttpContext.Current.Server.MapPath("~/xmlfile1.xml");
- DataSet ds = new DataSet();
- ds.ReadXml(xmlfajl);
- //Sortiranje fala po citanosti knjige
- DataView dv = new DataView(ds.Tables[0]);
- dv.Sort = "MaxTemperatura DESC";
- if (ds.Tables[0].Rows.Count > 0)
- {
- GridView1.DataSource = dv;
- GridView1.DataBind();
- }
- else
- {
- Response.Write("Nema podataka za prikaz!");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement