Click here to Skip to main content
15,897,704 members

Comments by Maria Vinod (Top 6 by date)

Maria Vinod 9-Dec-13 23:05pm View    
<asp:HiddenField ID="hdn_Lat" runat="server" Value="0" />
<asp:TextBox ID="txtAddress" runat="server" /> <br />
<asp:Button ID="btnAdd" runat="server" Text ="Add Location"
OnClientClick="javascript:return GetLocation();" onclick="btnAdd_Click1" />
<asp:Label ID="Label1" runat="server">


Javascript method:

<script type="text/javascript">
<!--
function GetLocation() {
var geocoder = new google.maps.Geocoder();
var address = document.getElementById("txtAddress").value;
var hdnLat = document.getElementById('<%= hdn_Lat.ClientID %>').value;
geocoder.geocode({ 'address': address }, function (results, status) {
if (status == google.maps.GeocoderStatus.OK) {
var latitude = results[0].geometry.location.lat();
var longitude = results[0].geometry.location.lng();
hdnLat = latitude;
alert(hdnLat);
//alert("Latitude: " + latitude + "\nLongitude: " + longitude);
} else {
alert("Request failed.")
}
});
};
//-->
</script>


Code behind:

protected void btnAdd_Click1(object sender, EventArgs e)
{

//string value ;
//ClientScript.RegisterStartupScript(this.GetType(), "GetData", "a=GetLocation():alert(a)", true);

Label1.Text = hdn_Lat.Value;

}
Maria Vinod 28-Nov-13 0:19am View    
Thanks a lot RK...
Maria Vinod 6-Sep-13 0:24am View    
Dear Dave,
My requirement is to move files my local system to ftp server location, this code is perfectly working for ftp server location. But when am moving these files to sftp server then getting error like "The underlying connection was closed: The server committed a protocol violation". Please help how to move files to SFTP server location ? I hope you understand my problem.
Maria Vinod 14-Nov-12 0:36am View    
Yes, RefNumber is also one of the column of "Student" table, am getting the count of the same table +1 as RefNumber and inserting this RefNumber updating in the same table.
Maria Vinod 25-Jul-12 2:45am View    
thanks for your reply...