| | |
ASP.NET project help
Please support our ASP.NET advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
![]() |
•
•
Join Date: Sep 2007
Posts: 86
Reputation:
Solved Threads: 1
I have this web page that sends a start real-time tracking command to GPS devices all over. The way the code is currently written fulfills its purpose as long as the page is actively loaded. However, if the user shuts down the browser or the computer, the device does not receive the stop real-time tracking command since the program is not running.
What I would like to accomplish is to create a script or service that will keep track of when a device needs to stop reporting in the event the user forgot to stop the real time tracking. I want to implement this feature for two reasons. First, the constant (non-stop) reporting becomes a billing issue for the company and second the devices are battery operated and the issue of energy consumption plays a big part.
What I was thinking on doing is implementing an AJAX script that will access the web method at the end of a specific interval but I believe this implementation will not work either. I tried to use the setTimeout() method with Ajax and it did not go very well.
I need some help and I would appreciate any input that would put me back on track with this project?
Thank you,
What I would like to accomplish is to create a script or service that will keep track of when a device needs to stop reporting in the event the user forgot to stop the real time tracking. I want to implement this feature for two reasons. First, the constant (non-stop) reporting becomes a billing issue for the company and second the devices are battery operated and the issue of energy consumption plays a big part.
What I was thinking on doing is implementing an AJAX script that will access the web method at the end of a specific interval but I believe this implementation will not work either. I tried to use the setTimeout() method with Ajax and it did not go very well.
I need some help and I would appreciate any input that would put me back on track with this project?
Thank you,
•
•
Join Date: Sep 2007
Posts: 1,080
Reputation:
Solved Threads: 68
Have you considered using an Page_Unload method, and then backing it up through javascript on the <body onUnload="stopDevice()"> where stopDevice() is a javascript function?
This way you can have your C# or VB.NET to end your device transmission and a javascript backup just for insurance.
I have never dealt with the situation you are in, so I cannot be very good help, but hopefully I can lead you into a better direction.
This way you can have your C# or VB.NET to end your device transmission and a javascript backup just for insurance.
I have never dealt with the situation you are in, so I cannot be very good help, but hopefully I can lead you into a better direction.
•
•
Join Date: Sep 2007
Posts: 86
Reputation:
Solved Threads: 1
Thank you for your reply and you definitely gave me some good idea on how to proceed. The question is: would this method also works if the user terminate the session by just closing the browser? I am really new to this javascript stuff but it doesn't appear to be a very difficult language. My real problem is that I don't know enough of it to be able to get things done fast enough.
•
•
Join Date: Sep 2007
Posts: 1,080
Reputation:
Solved Threads: 68
Sure, here's a detailed explanation of what you can use, and what you might have to:
http://www.codeproject.com/useritems...of_Browser.asp
The one problem you will face is that javascript is client based, so if they have it disabled it will not work for them. You MIGHT be able to run the javascript server side since you're using asp.net, but I cannot guarantee that. You can use what you see here for an explanation on what to look for if you plan to write your own private function via VB or C#, or the like. I, personally, like to make sure all sides are covered. I would use the javascript, all functions for all browsers with if statements to determine which browser is which, and use the behind coding to make sure the connection is closed. I don't find a problem adding the extra code as it is only extra insurance, which I believe is necessary.
http://www.codeproject.com/useritems...of_Browser.asp
The one problem you will face is that javascript is client based, so if they have it disabled it will not work for them. You MIGHT be able to run the javascript server side since you're using asp.net, but I cannot guarantee that. You can use what you see here for an explanation on what to look for if you plan to write your own private function via VB or C#, or the like. I, personally, like to make sure all sides are covered. I would use the javascript, all functions for all browsers with if statements to determine which browser is which, and use the behind coding to make sure the connection is closed. I don't find a problem adding the extra code as it is only extra insurance, which I believe is necessary.
•
•
Join Date: Sep 2007
Posts: 86
Reputation:
Solved Threads: 1
thank you for the link, though I understand some of the code on that page, but most of goes right over my head. For now I think it is safe to program a quick disconnect method in the event a user exited the page in question. later, I can take my time implementing a method that will cover all bases.
Thank you very much for your help.
Thank you very much for your help.
![]() |
Similar Threads
- ASP.NET project (ASP.NET)
- how can I copy asp.net project from one system and work on it in a different system (ASP.NET)
- i ned asp.net project (ASP.NET)
- I need a ASP.net project (ASP.NET)
- Error creating new ASP.Net project (ASP.NET)
Other Threads in the ASP.NET Forum
- Previous Thread: Difference between asp & asp.net
- Next Thread: Implementing biometrics GrFinger in vb.net
| Thread Tools | Search this Thread |
.net 3.5 activexcontrol advice ajax alltypeofvideos asp asp.net bc30451 beginner bottomasp.net browser businesslogiclayer c# c#gridviewcolumn cac checkbox class commonfunctions compatible confirmationcodegeneration content countryselector courier css dataaccesslayer database datagrid datagridview datagridviewcheckbox datalist deployment development dgv dropdownlist dropdownmenu dynamic dynamically edit embeddingactivexcontrol fileuploader fill findcontrol flash formatdecimal forms formview gridview gudi homeedition iframe iis javascript jquery listbox microsoft mouse mssql multistepregistration nameisnotdeclared news objects opera panelmasterpagebuttoncontrols problem redirect registration relationaldatabases reportemail rotatepage schoolproject security sessionvariables silverlight smartcard smoobjects software sql sql-server sqlserver2005 ssl textbox tracking treeview unauthorized validatedate validation vb.net video videos virtualdirectory vista visualstudio web webapplications webdevelopemnt webdevelopment webprogramming webservice youareanotmemberofthedebuggerusers






