protected void Button1_Click(object sender, EventArgs e) { Label2.Visible = false; ServiceSubscription.Service1Client svc = new ServiceSubscription.Service1Client(); string response = svc.TransactionSummary(TextBox1.Text); Label2.Text = response; Label2.Visible = true; }
protected void Button1_Click(object sender, EventArgs e) { ListBox1.Items.Clear(); ServiceSubscription.Service1Client svc = new ServiceSubscription.Service1Client(); String[] reply = svc.TopNearByPlaceFinder(TextBox1.Text); foreach (string r in reply) { ListBox1.Items.Add(r); } ListBox1.Visible = true; }
/// <summary> /// Event to trigger Word Filter service and retrieve output /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnFilter_Click(object sender, EventArgs e) { if (inputTxt.Text != "") { ServiceSubscription.Service1Client wordFilter = new ServiceSubscription.Service1Client(); string filtered = wordFilter.WordFilter(inputTxt.Text); lblOutput.Visible = true; lblOutput.Text = filtered; } else { ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "ClientScript", "alert('Please enter Url')", true); } }
/// <summary> /// Event to triggr service call and get output /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnTopTen_Click(object sender, EventArgs e) { Regex R = new Regex(@"https://([A-Za-z0-9\-]+).[A-Za-z0-9\-]+"); if (R.Match(urlInput.Text).Success) { if (urlInput.Text != "") { String[] words = new String[10]; ServiceSubscription.Service1Client subscribe = new ServiceSubscription.Service1Client(); words = subscribe.Top10Words(urlInput.Text); foreach (string word in words) { Top10WordList.Items.Add(word); } Top10WordList.Visible = true; } } else { Console.WriteLine("Incorrect URL"); } }