protected void Submit_Click(object sender, EventArgs e)
    {
        locator.locate find = new locator.locate();
        string q = txtblood.Text;
        string r = txtZip.Text;
        string ab = find.locate0(r, q);
        string bc = find.locate1(r, q);
        string cd = find.locate2(r, q);
        string de = find.counting(r, q);

        Label1.Text = de;
        string address = ab + "," + bc + "," + cd + "," + r;
        string latitude1 = "";
        string longitude1 = "";
        // Response.Redirect("http://where.yahooapis.com/geocode?location=" +address );

        XmlTextReader xtr = new XmlTextReader("http://where.yahooapis.com/geocode?location=" + address);
        xtr.WhitespaceHandling = WhitespaceHandling.Significant;
        //Response.Write(xtr.ToString());
        try
        {
            while (xtr.Read())
            {
                if (xtr.Name.ToString() == "latitude")
                {
                    latitude1 = xtr.ReadString().ToString();
                }
                if (xtr.Name.ToString() == "longitude")
                {
                    longitude1 = xtr.ReadString().ToString();
                }

            }

            GMap2.addGMapUI(new GMapUI());
            GMapUIOptions options = new GMapUIOptions();
            GLatLng latlong = new GLatLng(double.Parse(latitude1), double.Parse(longitude1));
            GMapType.GTypes maptype = GMapType.GTypes.Normal;
            GMap2.setCenter(latlong, 15, maptype);
            //GMap2.GZoom = 9;
            PinLetter pinLetter = new PinLetter("o", Color.Red, Color.Black);

            GMap2.addGMarker(new GMarker(latlong, new GMarkerOptions(new GIcon(pinLetter.ToString(), pinLetter.Shadow()))));
            GMarker marker = new GMarker(latlong);
            GInfoWindowOptions IWoptions = new GInfoWindowOptions(12, maptype);

            GInfoWindow mbUp = new GInfoWindow(marker, address, IWoptions);
            GMap2.addInfoWindow(mbUp);

        }
        catch (Exception)
        {
            Response.Write("invalid adress");
        }
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        locator.locate find = new locator.locate();
          String j = bgroup.Text;
         String[] emailList= find.mailing(j);
         // string a = group.Text;
        //   a = a + ", [email protected],[email protected]";

        //List<String> emailList=null;
        //emailList.
           string a="";
           foreach(String eachItem in emailList){
           a = eachItem+", "+a;
           }
           a = a.Substring(0, a.Length - 2);
        string b = body.Text;
        MailMessage MyMailMessage = new MailMessage("*****@*****.**", a,"Donor Notifications", b);
        MyMailMessage.IsBodyHtml = false;
        NetworkCredential mailAuthentication = new NetworkCredential("*****@*****.**", "giveblood");
        SmtpClient mailClient = new SmtpClient("smtp.gmail.com", 587);
        mailClient.EnableSsl = true;
        mailClient.UseDefaultCredentials = false;
        mailClient.Credentials = mailAuthentication;
        mailClient.Send(MyMailMessage);
        Label1.Text = "Sent Notifications Successfully";
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        Label1.Text = (string)Session["firstname"];
        string z;
        z = (string)Session["firstname"];
        MyWebReference1.Ls login = new MyWebReference1.Ls();
        string bg = login.question1(z);
        string zi = login.question2(z);
        locator.locate find = new locator.locate();

        Label2.Text = find.general1(bg);
        Label3.Text = find.campaign1(zi);
    }