Exemplo n.º 1
0
 protected void subCommand(object sender, DataListCommandEventArgs e)
 {
     switch (e.CommandName)
     {
         case "btn_save":
             try
             {
                 googleMap gmObj = new googleMap();
                 TextBox lat = (TextBox)e.Item.FindControl("txt_lat");
                 TextBox lng = (TextBox)e.Item.FindControl("txt_lng");
                 lbl_results.Text = gmObj.updateData(lat.Text.ToString(), lng.Text.ToString());
                 subRebind();
             }
             catch (Exception err)
             {
                 lbl_results.Text = "We're sorry, but the following error occured: " + err.Message.ToString();
             }
             break; 
     }
 }
Exemplo n.º 2
0
 protected void subRebind()
 {
     googleMap gmObj = new googleMap();
     dl_gmap.DataSource = gmObj.getData(); 
     dl_gmap.DataBind();
 }