silverlight application

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • E481610
    New Member
    • Apr 2010
    • 13

    silverlight application

    hi thanks for ur all replies,
    as u told i tried my self for the web service calling ........its getting....
    but
    what the problem iam facing is ......web service is automatically getting called

    but,
    i want as.....".when i click the button the service should get called.....mean s "
    i want to attach my webservice calling to the button click event
    ......

    please help me regarding this........

    the code i have written in the button event class is shown below

    Code:
     public MainPage()
            {
                InitializeComponent();
            }
    
            private void but1_Click(object sender, RoutedEventArgs e)
            {
                InitializeComponent();            
                Loaded +=new RoutedEventHandler(MainPage_Loaded);            
            }
    
            private void MainPage_Loaded(object sender, RoutedEventArgs e)
            {
                ServiceReference1.IwcfserviceClient web = new showto.ServiceReference1.IwcfserviceClient();
                web.showdataCompleted += new EventHandler<showto.ServiceReference1.showdataCompletedEventArgs>(web_showdataCompleted);
                web.showdataAsync();
            }
    
            private void web_showdataCompleted(object sender, showto.ServiceReference1.showdataCompletedEventArgs e)
            {
                showto.ItemsSource = e.Result;
            }
        }
    }
    please respond to this quickly........ .
    Thanku so much
    Last edited by tlhintoq; Apr 29 '10, 01:52 PM. Reason: [CODE] ...Your code goes between code tags [/CODE]
Working...