Provides the location of the mobile device.
Namespace: FiftyOne.Framework.Mobile.ControlsAssembly: FiftyOne.Framework (in FiftyOne.Framework.dll) Version: 2.0.2.1 (2.0.2.1)
Syntax
| C# |
|---|
[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)] public class Location : CompositeControl, IPostBackEventHandler, IMobileProfileControl, ICssIncludeGroup, IStyle, IUrlResolutionService, INamingContainer |
| Visual Basic |
|---|
<AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level := AspNetHostingPermissionLevel.Minimal)> _ Public Class Location _ Inherits CompositeControl _ Implements IPostBackEventHandler, IMobileProfileControl, ICssIncludeGroup, IStyle, _ IUrlResolutionService, INamingContainer |
| Visual C++ |
|---|
[AspNetHostingPermissionAttribute(SecurityAction::InheritanceDemand, Level = AspNetHostingPermissionLevel::Minimal)] public ref class Location : public CompositeControl, IPostBackEventHandler, IMobileProfileControl, ICssIncludeGroup, IStyle, IUrlResolutionService, INamingContainer |
Examples
The following code example demonstrates how to use the Location control. If location found displays it.
<mob:Location runat="server" ID="locationctrl" Mode="GeoCode" DisplayLocation="True" GeoCodeMaxItems="4" GeoCodeTimeout="20" GeoSearchCountryCode="GB" GeoSearchCountryMode="Auto" HighAccuracy="True" RequestAddress="True" OnLocationFound="locationctrl_LocationFound" /> <mob:Label ID="info" runat="server" />
protected void locationctrl_LocationFound(object source, FiftyOne.Framework.Mobile.Controls.LocationFoundEventArgs e) { info.Text = "Position : " + e.LocationInfo.Position.ToDisplay().ToString(); }
Inheritance Hierarchy
System..::..Object
System.Web.UI..::..Control
System.Web.UI.WebControls..::..WebControl
System.Web.UI.WebControls..::..CompositeControl
FiftyOne.Framework.Mobile.Controls..::..Location
System.Web.UI..::..Control
System.Web.UI.WebControls..::..WebControl
System.Web.UI.WebControls..::..CompositeControl
FiftyOne.Framework.Mobile.Controls..::..Location