Click here to Skip to main content
15,886,422 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have w web service i want to show some outpu of this xaml code in textblocks waht is the specific code i must write
thanks so much
i put this code but it doesn't work with me
C#
Public partial class Page1 : PhoneApplicationPage

    {
        WebClient client;
        public Class1 inf = new Class1();
        
        public Page1()
        {
             InitializeComponent();
            client = new WebClient();
            client.DownloadStringCompleted += new DownloadStringCompletedEventHandler(client_DownloadStringCompleted);
            
            
        }

        void client_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
        {
            if (e.Error == null)
            {
                XElement resultElements = XElement.Parse(e.Result);

                name = resultElements.Element("actorName").Value;
                faculty = resultElements.Element("facultyName").Value;
                subject = resultElements.Element("deptName").Value;
                campusName = resultElements.Element("campusName").Value;
               // studentno = resultElements.Element("uniNo").Value;
                // mobileno = resultElements.Element("mobile").Value;
                string yyy = inf.uri + textBlock1.Text + "/1";

                client.DownloadStringAsync(new Uri(yyy));


                textBlock1.Text = name;
                textBlock2.Text = faculty;
                textBlock3.Text = subject;
                textBlock4.Text = campusName;
            
                
            }
Posted
Updated 28-Mar-12 22:16pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900