scrive in un componente ASP ma NON lo rilegge perché popolato a runtime lato browser
This commit is contained in:
Binary file not shown.
@@ -43,6 +43,7 @@ namespace WebSCR
|
||||
bundles.Add(new ScriptBundle("~/bundles/jSteamware").Include(
|
||||
"~/Scripts/jSteamware*"));
|
||||
|
||||
|
||||
//bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
|
||||
// "~/Scripts/jquery.unobtrusive*",
|
||||
// "~/Scripts/jquery.validate*"));
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
</asp:ContentPlaceHolder>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<form id="form1" runat="server">
|
||||
<%--aggiunto 2014.10.15 x inserire report inline...--%>
|
||||
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+48
-48
@@ -1,54 +1,54 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="elmah">
|
||||
<section name="security" requirePermission="false" type="Elmah.SecuritySectionHandler, Elmah"/>
|
||||
<section name="errorLog" requirePermission="false" type="Elmah.ErrorLogSectionHandler, Elmah"/>
|
||||
<section name="errorMail" requirePermission="false" type="Elmah.ErrorMailSectionHandler, Elmah"/>
|
||||
<section name="errorFilter" requirePermission="false" type="Elmah.ErrorFilterSectionHandler, Elmah"/>
|
||||
<section name="security" requirePermission="false" type="Elmah.SecuritySectionHandler, Elmah" />
|
||||
<section name="errorLog" requirePermission="false" type="Elmah.ErrorLogSectionHandler, Elmah" />
|
||||
<section name="errorMail" requirePermission="false" type="Elmah.ErrorMailSectionHandler, Elmah" />
|
||||
<section name="errorFilter" requirePermission="false" type="Elmah.ErrorFilterSectionHandler, Elmah" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<appSettings>
|
||||
<!--parametri base-->
|
||||
<add key="intUpdatePagina_ms" value="240000"/>
|
||||
<add key="zonaDef" value="Z00"/>
|
||||
<add key="numGgDef" value="30"/>
|
||||
<add key="minCookieSquadra" value="3"/>
|
||||
<add key="intUpdatePagina_ms" value="240000" />
|
||||
<add key="zonaDef" value="Z00" />
|
||||
<add key="numGgDef" value="30" />
|
||||
<add key="minCookieSquadra" value="3" />
|
||||
<!--nome sw e versioni-->
|
||||
<add key="CodModulo" value="WebSCR"/>
|
||||
<add key="AutoAuth" value="true"/>
|
||||
<add key="baseUrl" value="http://iis02/WebSCR"/>
|
||||
<add key="CodModulo" value="WebSCR" />
|
||||
<add key="AutoAuth" value="true" />
|
||||
<add key="baseUrl" value="http://iis02/WebSCR" />
|
||||
<!--Logging-->
|
||||
<add key="_logDir" value="~/logs/"/>
|
||||
<add key="doShrinkFolder" value="true"/>
|
||||
<add key="_logLevel" value="6"/>
|
||||
<add key="_logMaxMb" value="30"/>
|
||||
<add key="_logDir" value="~/logs/" />
|
||||
<add key="doShrinkFolder" value="true" />
|
||||
<add key="_logLevel" value="6" />
|
||||
<add key="_logMaxMb" value="30" />
|
||||
<!--Gestione email-->
|
||||
<add key="_fromEmail" value="steamwarebot@gmail.com"/>
|
||||
<add key="_smtpCli" value="smtp.gmail.com"/>
|
||||
<add key="_emailUser" value="steamwarebot@gmail.com"/>
|
||||
<add key="_emailPwd" value="drmfsls16"/>
|
||||
<add key="_enableSSL" value="true"/>
|
||||
<add key="_fromEmail" value="steamwarebot@gmail.com" />
|
||||
<add key="_smtpCli" value="smtp.gmail.com" />
|
||||
<add key="_emailUser" value="steamwarebot@gmail.com" />
|
||||
<add key="_emailPwd" value="drmfsls16" />
|
||||
<add key="_enableSSL" value="true" />
|
||||
<!--gestione auth dispositivi-->
|
||||
<add key="AuthCookieName" value="AuthDeviceWebSCR"/>
|
||||
<add key="defaultDomain" value="WebSCR"/>
|
||||
<add key="enablePlain" value="true"/>
|
||||
<add key="urlGestUtenti" value="UserAdmin"/>
|
||||
<add key="adminEmail" value="samuele@steamware.net"/>
|
||||
<add key="PageNoIndex" value="UserAdmin#Test"/>
|
||||
<add key="AuthCookieName" value="AuthDeviceWebSCR" />
|
||||
<add key="defaultDomain" value="WebSCR" />
|
||||
<add key="enablePlain" value="true" />
|
||||
<add key="urlGestUtenti" value="UserAdmin" />
|
||||
<add key="adminEmail" value="samuele@steamware.net" />
|
||||
<add key="PageNoIndex" value="UserAdmin#Test" />
|
||||
<!--gestione sw uploader locale-->
|
||||
<add key="localUplURL" value="http://IIS02"/>
|
||||
<add key="localUplURL" value="http://IIS02" />
|
||||
<!--stringhe connessione-->
|
||||
<add key="WebSCRConnectionString" value="Data Source=10.74.82.217\SQL2008R2;Initial Catalog=WebSCR;Persist Security Info=True;User ID=sa;Password=keyhammer;"/>
|
||||
<add key="WebSCRFilesConnectionString" value="Data Source=10.74.82.217\SQL2008R2;Initial Catalog=WebSCR;Persist Security Info=True;User ID=sa;Password=keyhammer;"/>
|
||||
<add key="DevicesAuthConnectionString" value="Data Source=10.74.82.217\SQL2008R2;Initial Catalog=WebSCR;Persist Security Info=True;User ID=sa;Password=keyhammer;"/>
|
||||
<add key="WebSCRConnectionString" value="Data Source=10.74.82.217\SQL2008R2;Initial Catalog=WebSCR;Persist Security Info=True;User ID=sa;Password=keyhammer;" />
|
||||
<add key="WebSCRFilesConnectionString" value="Data Source=10.74.82.217\SQL2008R2;Initial Catalog=WebSCR;Persist Security Info=True;User ID=sa;Password=keyhammer;" />
|
||||
<add key="DevicesAuthConnectionString" value="Data Source=10.74.82.217\SQL2008R2;Initial Catalog=WebSCR;Persist Security Info=True;User ID=sa;Password=keyhammer;" />
|
||||
</appSettings>
|
||||
<connectionStrings>
|
||||
<!--
|
||||
<add name="SteamWare.Properties.Settings.WebSCRConnectionString" connectionString="Data Source=10.74.82.217\SQL2008R2;Initial Catalog=WebSCR;Persist Security Info=True;User ID=sa;Password=keyhammer" providerName="System.Data.SqlClient" />-->
|
||||
<add name="WebSCR_data.Properties.Settings.WebSCRConnectionString" connectionString="Data Source=10.74.82.217\SQL2008R2;Initial Catalog=WebSCR;Persist Security Info=True;User ID=sa;Password=keyhammer" providerName="System.Data.SqlClient" />
|
||||
<add name="WebSCR_data.Properties.Settings.WebSCR_filesConnectionString" connectionString="Data Source=10.74.82.217\SQL2008R2;Initial Catalog=WebSCR_files;Persist Security Info=True;User ID=sa;Password=keyhammer" providerName="System.Data.SqlClient" />
|
||||
<add name="SteamWare.Properties.Settings.DS_AuthConnectionString" connectionString="Data Source=10.74.82.217\SQL2008R2;Initial Catalog=WebSCR;Persist Security Info=True;User ID=sa;Password=keyhammer" providerName="System.Data.SqlClient"/>
|
||||
<add name="SteamWare.Properties.Settings.DS_AuthConnectionString" connectionString="Data Source=10.74.82.217\SQL2008R2;Initial Catalog=WebSCR;Persist Security Info=True;User ID=sa;Password=keyhammer" providerName="System.Data.SqlClient" />
|
||||
</connectionStrings>
|
||||
<!--
|
||||
For a description of web.config changes for .NET 4.5 see http://go.microsoft.com/fwlink/?LinkId=235367.
|
||||
@@ -61,7 +61,7 @@
|
||||
<system.web>
|
||||
<compilation debug="true" targetFramework="4.5">
|
||||
<assemblies>
|
||||
<add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
|
||||
<add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
|
||||
</assemblies>
|
||||
</compilation>
|
||||
<!--
|
||||
@@ -69,7 +69,7 @@
|
||||
of the security authentication mode used by
|
||||
ASP.NET to identify an incoming user.
|
||||
-->
|
||||
<authentication mode="Windows"/>
|
||||
<authentication mode="Windows" />
|
||||
<!--
|
||||
The <customErrors> section enables configuration
|
||||
of what to do if/when an unhandled error occurs
|
||||
@@ -84,16 +84,16 @@
|
||||
-->
|
||||
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
|
||||
<namespaces>
|
||||
<add namespace="System.Web.Optimization"/>
|
||||
<add namespace="System.Web.Optimization" />
|
||||
</namespaces>
|
||||
<controls>
|
||||
<add assembly="Microsoft.AspNet.Web.Optimization.WebForms" namespace="Microsoft.AspNet.Web.Optimization.WebForms" tagPrefix="webopt"/>
|
||||
<add assembly="Microsoft.AspNet.Web.Optimization.WebForms" namespace="Microsoft.AspNet.Web.Optimization.WebForms" tagPrefix="webopt" />
|
||||
</controls>
|
||||
</pages>
|
||||
<httpModules>
|
||||
<add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah"/>
|
||||
<add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah"/>
|
||||
<add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah"/>
|
||||
<add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" />
|
||||
<add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" />
|
||||
<add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah" />
|
||||
</httpModules>
|
||||
</system.web>
|
||||
<!--
|
||||
@@ -101,11 +101,11 @@
|
||||
Information Services 7.0. It is not necessary for previous version of IIS.
|
||||
-->
|
||||
<system.webServer>
|
||||
<validation validateIntegratedModeConfiguration="false"/>
|
||||
<validation validateIntegratedModeConfiguration="false" />
|
||||
<modules>
|
||||
<add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" preCondition="managedHandler"/>
|
||||
<add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" preCondition="managedHandler"/>
|
||||
<add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah" preCondition="managedHandler"/>
|
||||
<add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" preCondition="managedHandler" />
|
||||
<add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" preCondition="managedHandler" />
|
||||
<add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah" preCondition="managedHandler" />
|
||||
</modules>
|
||||
</system.webServer>
|
||||
<elmah>
|
||||
@@ -113,12 +113,12 @@
|
||||
See http://code.google.com/p/elmah/wiki/SecuringErrorLogPages for
|
||||
more information on remote access and securing ELMAH.
|
||||
-->
|
||||
<security allowRemoteAccess="false"/>
|
||||
<security allowRemoteAccess="false" />
|
||||
</elmah>
|
||||
<location path="elmah.axd" inheritInChildApplications="false">
|
||||
<system.web>
|
||||
<httpHandlers>
|
||||
<add verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah"/>
|
||||
<add verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah" />
|
||||
</httpHandlers>
|
||||
<!--
|
||||
See http://code.google.com/p/elmah/wiki/SecuringErrorLogPages for
|
||||
@@ -132,15 +132,15 @@
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<handlers>
|
||||
<add name="ELMAH" verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah" preCondition="integratedMode"/>
|
||||
<add name="ELMAH" verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah" preCondition="integratedMode" />
|
||||
</handlers>
|
||||
</system.webServer>
|
||||
</location>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234"/>
|
||||
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
|
||||
@@ -347,6 +347,7 @@
|
||||
<Content Include="Scripts\jSteamware.js" />
|
||||
<Content Include="Setup.aspx" />
|
||||
<Content Include="Squadra.aspx" />
|
||||
<Content Include="Test.html" />
|
||||
<Content Include="UserAdmin.aspx" />
|
||||
<Content Include="WebUserControls\mod_consegne.ascx" />
|
||||
<Content Include="WebUserControls\mod_dettInt.ascx" />
|
||||
|
||||
@@ -1,10 +1,114 @@
|
||||
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="mod_gestIntSquadra.ascx.cs" Inherits="WebSCR.WebUserControls.mod_gestIntSquadra" %>
|
||||
<script>
|
||||
function salvaCoord() {
|
||||
if (navigator.geolocation) {
|
||||
navigator.geolocation.getCurrentPosition(showPosition, positionError);
|
||||
function showPosition(position) {
|
||||
var currCoord = position.coords;
|
||||
//document.getElementById("<%=lblLat.ClientID %>").value = currCoord.latitude;
|
||||
//document.getElementById("<%=lblLon.ClientID %>").value = currCoord.longitude;
|
||||
//$("#ctl00_ContentPlaceHolder1_<%: this.ID %>_lblLat").innerHTML = currCoord.latitude;
|
||||
//$("#ctl00_ContentPlaceHolder1_<%: this.ID %>_lblLon").val(currCoord.longitude);
|
||||
$("#<%=lblLat.ClientID %>").val(currCoord.latitude);
|
||||
$("#<%=lblLon.ClientID %>").val(currCoord.longitude);
|
||||
}
|
||||
|
||||
function positionError(position) {
|
||||
alert("Errore: " + position.code);
|
||||
}
|
||||
} else {
|
||||
alert("Errore: Geolocation is not supported by this browser.");
|
||||
}
|
||||
}
|
||||
// aggancio evento doc pronto con jQuery...
|
||||
$(function () {
|
||||
salvaCoord();
|
||||
});
|
||||
var prm = Sys.WebForms.PageRequestManager.getInstance();
|
||||
prm.add_endRequest(function () {
|
||||
$(function () {
|
||||
// chiamate jquery da rieseguire post ajax update x partial page render
|
||||
$(function () {
|
||||
salvaCoord();
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
var x = document.getElementById("demo");
|
||||
function getLocation() {
|
||||
if (navigator.geolocation) {
|
||||
navigator.geolocation.getCurrentPosition(showPosition);
|
||||
} else {
|
||||
x.innerHTML = "Geolocation is not supported by this browser.";
|
||||
}
|
||||
}
|
||||
function showPosition(position) {
|
||||
x.innerHTML = "Latitude: " + position.coords.latitude +
|
||||
"<br>Longitude: " + position.coords.longitude;
|
||||
}
|
||||
</script>
|
||||
<p>Click the button to get your coordinates.</p>
|
||||
|
||||
<button onclick="getLocation()">Try It</button>
|
||||
<p id="demo">aaaaaa</p>
|
||||
|
||||
<%--<script>
|
||||
function set<%=txtSel.ClientID %>()
|
||||
{
|
||||
$("#<%=txtSel.ClientID %>").autocomplete({
|
||||
source: function (request, response) {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
contentType: "application/json; charset=utf-8",
|
||||
url: "<%=txtServiceUrl.Text %>",
|
||||
data: "{'prefixText':'" + request.term + "'}",
|
||||
dataType: "json",
|
||||
async: true,
|
||||
success: function (data) {
|
||||
//response(data.d);
|
||||
response($.map(data.d, function (item) {
|
||||
return {
|
||||
label: item.split('#')[0],
|
||||
val: item.split('#')[1]
|
||||
}
|
||||
}))
|
||||
},
|
||||
error: function (result) {
|
||||
alert("Impossibile caricare i dati!");
|
||||
}
|
||||
});
|
||||
},
|
||||
select: function (e, i) {
|
||||
$("#<%=hiddenFieldID.ClientID %>").val(i.item.val);
|
||||
$("#<%=txtSel.ClientID %>").val(i.item.label);
|
||||
$("#<%=btnPost.ClientID %>").click();
|
||||
},
|
||||
minLength: <%=txtMinCharAutoCom.Text %>
|
||||
});
|
||||
}
|
||||
// aggancio evento doc pronto con jQuery...
|
||||
$(function () {
|
||||
set<%=txtSel.ClientID %>();
|
||||
});
|
||||
var prm = Sys.WebForms.PageRequestManager.getInstance();
|
||||
prm.add_endRequest(function () {
|
||||
$(function () {
|
||||
// chiamate jquery da rieseguire post ajax update x partial page render
|
||||
$(function () {
|
||||
set<%=txtSel.ClientID %>();
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>--%>
|
||||
|
||||
<div class="ui-mini">
|
||||
<div style="text-align: center; margin: auto;">
|
||||
<asp:LinkButton ID="lbInizioInt" CssClass="ui-btn ui-shadow ui-corner-all ui-icon-clock ui-btn-icon-right ui-btn-inline" runat="server" CausesValidation="False" Text="Inizio Intervento" Width="75%" />
|
||||
<asp:LinkButton ID="lbFineInt" CssClass="ui-btn ui-shadow ui-corner-all ui-icon-clock ui-btn-icon-right ui-btn-inline" runat="server" CausesValidation="False" Text="Fine Intervento" Width="75%" />
|
||||
<asp:LinkButton ID="lbNoteInt" CssClass="ui-btn ui-shadow ui-corner-all ui-icon-edit ui-btn-icon-right ui-btn-inline" runat="server" CausesValidation="False" Text="Note Intervento" Width="75%" />
|
||||
<asp:LinkButton ID="lbFileInt" CssClass="ui-btn ui-shadow ui-corner-all ui-icon-camera ui-btn-icon-right ui-btn-inline" runat="server" CausesValidation="False" Text="Allega File" Width="75%" />
|
||||
<asp:LinkButton ID="lbInizioInt" CssClass="ui-btn ui-shadow ui-corner-all ui-icon-clock ui-btn-icon-right ui-btn-inline" runat="server" CausesValidation="False" Text="Inizio Intervento" Width="75%" OnClick="lbInizioInt_Click" />
|
||||
<asp:LinkButton ID="lbFineInt" CssClass="ui-btn ui-shadow ui-corner-all ui-icon-clock ui-btn-icon-right ui-btn-inline" runat="server" CausesValidation="False" Text="Fine Intervento" Width="75%" OnClick="lbFineInt_Click" />
|
||||
<asp:LinkButton ID="lbNoteInt" CssClass="ui-btn ui-shadow ui-corner-all ui-icon-edit ui-btn-icon-right ui-btn-inline" runat="server" CausesValidation="False" Text="Note Intervento" Width="75%" OnClick="lbNoteInt_Click" />
|
||||
<asp:LinkButton ID="lbFileInt" CssClass="ui-btn ui-shadow ui-corner-all ui-icon-camera ui-btn-icon-right ui-btn-inline" runat="server" CausesValidation="False" Text="Allega File" Width="75%" OnClick="lbFileInt_Click" />
|
||||
</div>
|
||||
<asp:Label ID="lblLat" runat="server" Visible="true" Text="lat" />
|
||||
<asp:Label ID="lblLon" runat="server" Visible="true" Text="lon" />
|
||||
</div>
|
||||
|
||||
@@ -15,22 +15,29 @@ namespace WebSCR.WebUserControls
|
||||
{
|
||||
fixVisibility();
|
||||
}
|
||||
protected int IdxImpegno
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
try
|
||||
{
|
||||
answ = memLayer.ML.QSI("IdxImpegno");
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// sistemo visibilità buttons
|
||||
/// </summary>
|
||||
private void fixVisibility()
|
||||
{
|
||||
// verifico se impegno è iniziato o meno e di conseguenza mostro inizio/fine
|
||||
int idxImpergno = 0;
|
||||
try
|
||||
if (IdxImpegno > 0)
|
||||
{
|
||||
idxImpergno = memLayer.ML.QSI("IdxImpegno");
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
if (idxImpergno > 0)
|
||||
{
|
||||
DS_Applicazione.ImpegniRow riga = DtProxy.man.taImp.getByKey(idxImpergno)[0];
|
||||
DS_Applicazione.ImpegniRow riga = DtProxy.man.taImp.getByKey(IdxImpegno)[0];
|
||||
bool iniziato = false;
|
||||
bool finito = false;
|
||||
try
|
||||
@@ -55,5 +62,25 @@ namespace WebSCR.WebUserControls
|
||||
lbFineInt.Visible = iniziato && !finito;
|
||||
}
|
||||
}
|
||||
|
||||
protected void lbInizioInt_Click(object sender, EventArgs e)
|
||||
{
|
||||
//DtProxy.man.taImp.recStartInt(IdxImpegno, DateTime.Now, 0, 0);
|
||||
}
|
||||
|
||||
protected void lbFineInt_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected void lbNoteInt_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected void lbFileInt_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -47,5 +47,23 @@ namespace WebSCR.WebUserControls {
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.LinkButton lbFileInt;
|
||||
|
||||
/// <summary>
|
||||
/// lblLat control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblLat;
|
||||
|
||||
/// <summary>
|
||||
/// lblLon control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblLon;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,3 +24,18 @@
|
||||
<%: DataSel %> | <%: ClienteSel %> | <%: SquadraSel %>
|
||||
</div>
|
||||
</div>
|
||||
<asp:Label runat="server" ClientIDMode="Static" id="demo" style="font-size:0.6em;" OnUnload="demo_Unload">test</asp:Label>
|
||||
<script>
|
||||
$(document).ready(function (e) {
|
||||
navigator.geolocation.getCurrentPosition(function (pos) {
|
||||
var lat = pos.coords.latitude;
|
||||
var lng = pos.coords.longitude;
|
||||
if (lat == null) {
|
||||
alert("GPS not activated");
|
||||
}
|
||||
var x = document.getElementById("demo");
|
||||
x.innerHTML = "Coordinate: lat=" + lat + " lon=" + lng;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<asp:Label runat="server" ID="lblCoord" Text="..." />
|
||||
|
||||
@@ -122,13 +122,8 @@ namespace WebSCR.WebUserControls
|
||||
Response.Redirect("UserAdmin");
|
||||
}
|
||||
}
|
||||
bool showSel = true;
|
||||
// controllo se c'è il cookie
|
||||
if (memLayer.ML.hasCookieVal("colorSquadraCurr"))
|
||||
{
|
||||
// se c'è e non è expired
|
||||
showSel = false;
|
||||
}
|
||||
// !!!FARE!!! non lo intercetta
|
||||
lblCoord.Text = demo.Text;
|
||||
}
|
||||
/// <summary>
|
||||
/// verifica che la pagina sia tra quelle autorizzate x l'utente
|
||||
@@ -243,5 +238,11 @@ namespace WebSCR.WebUserControls
|
||||
memLayer.ML.setCookieVal(memLayer.ML.confReadString("AuthCookieName"), "");
|
||||
memLayer.ML.emptyCookieVal(memLayer.ML.confReadString("AuthCookieName"));
|
||||
}
|
||||
|
||||
protected void demo_Unload(object sender, EventArgs e)
|
||||
{
|
||||
lblCoord.Text = demo.Text;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+18
@@ -29,5 +29,23 @@ namespace WebSCR.WebUserControls {
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblVers;
|
||||
|
||||
/// <summary>
|
||||
/// demo control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label demo;
|
||||
|
||||
/// <summary>
|
||||
/// lblCoord control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lblCoord;
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+9
-9
@@ -27,10 +27,10 @@ installing ASP.NET Friendly URLs package:
|
||||
|
||||
using System.Web.Routing;
|
||||
...
|
||||
protected void Application_Start(object sender, EventArgs e)
|
||||
{
|
||||
RouteConfig.RegisterRoutes(RouteTable.Routes);
|
||||
}
|
||||
protected void Application_Start(object sender, EventArgs e)
|
||||
{
|
||||
RouteConfig.RegisterRoutes(RouteTable.Routes);
|
||||
}
|
||||
|
||||
|
||||
If your app had a RouteConfig class before installing
|
||||
@@ -42,9 +42,9 @@ ASP.NET Friendly URLs package:
|
||||
Call EnableFriendlyUrls() in your RegisterRoutes method
|
||||
*before* any existing route registrations:
|
||||
|
||||
public static void RegisterRoutes(RouteCollection routes)
|
||||
{
|
||||
routes.EnableFriendlyUrls();
|
||||
public static void RegisterRoutes(RouteCollection routes)
|
||||
{
|
||||
routes.EnableFriendlyUrls();
|
||||
|
||||
// Put any additional route registrations here.
|
||||
}
|
||||
// Put any additional route registrations here.
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user