Click here to Skip to main content
15,915,780 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: User Permission in ASP.Net MVC 2 Pin
character_kute28-May-11 17:45
character_kute28-May-11 17:45 
GeneralRe: User Permission in ASP.Net MVC 2 Pin
Not Active28-May-11 18:10
mentorNot Active28-May-11 18:10 
GeneralRe: User Permission in ASP.Net MVC 2 Pin
character_kute29-May-11 0:53
character_kute29-May-11 0:53 
GeneralRe: User Permission in ASP.Net MVC 2 Pin
Not Active29-May-11 2:49
mentorNot Active29-May-11 2:49 
GeneralRe: User Permission in ASP.Net MVC 2 Pin
character_kute30-May-11 4:26
character_kute30-May-11 4:26 
GeneralTextbox AutoComplete using Jquery like justdial.com [modified] Pin
Mansuri Aarif27-May-11 20:28
Mansuri Aarif27-May-11 20:28 
GeneralRe: Textbox AutoComplete using Jquery like justdial.com Pin
Shahriar Iqbal Chowdhury/Galib27-May-11 20:38
professionalShahriar Iqbal Chowdhury/Galib27-May-11 20:38 
AnswerRe: Textbox AutoComplete using Jquery like justdial.com Pin
AspDotNetDev27-May-11 21:28
protectorAspDotNetDev27-May-11 21:28 
Luckily, I was working on this very problem today:
HTML
<html>
<head>
	<title>jQuery Auto-Complete Using Google Maps API</title>
	<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.4.2.min.js"></script>
	<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.10/jquery-ui.min.js"></script>
	<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
	<script type="text/javascript">
		$(document).ready(function () {
			
			// Used to store functions.
			function AutoCompleteSample() {
			}
			
			// Accepts an auto-complete term and responds with results.
			AutoCompleteSample.handleAutocompleteRequest = function (request, response) {
				var geocoder = new google.maps.Geocoder();
				geocoder.geocode({address: request.term}, function(results, status) {
					response($.map(results, function(item) {
						return {
							label: item.formatted_address,
							value: item.formatted_address,
							latitude: item.geometry.location.lat(),
							longitude: item.geometry.location.lng()
						};
					}));
				});
			};
			
			// Returns a function that handles an auto-complete response.
			AutoCompleteSample.create_handleFoundLocation = function () {
				return function (event, ui) {
					var lat = ui.item.latitude;
					var lon = ui.item.longitude;
					var location = new google.maps.LatLng(lat, lon);
					alert(location);
				};
			};
			
			// Setup auto-complete for the below textbox.
			$("#txtAddress").autocomplete({
				// This function gets auto-complete results based on what the user types.
				source: AutoCompleteSample.handleAutocompleteRequest,
				// This function gets called when the user selects a result.
				select: AutoCompleteSample.create_handleFoundLocation()
			});
			
		});
	</script>
	<style type="text/css">
		/* You will want to add some style rules here to make the auto-complete list look pretty. */
	</style>
</head>
<body>
	<input type="text" id="txtAddress" />
</body>
</html>

That JavaScript is highlighted strangely in the above PRE block, so here is the JavaScript by itself (i.e., without the HTML):
JavaScript
$(document).ready(function () {
	
	// Used to store functions.
	function AutoCompleteSample() {
	}
	
	// Accepts an auto-complete term and responds with results.
	AutoCompleteSample.handleAutocompleteRequest = function (request, response) {
		var geocoder = new google.maps.Geocoder();
		geocoder.geocode({address: request.term}, function(results, status) {
			response($.map(results, function(item) {
				return {
					label: item.formatted_address,
					value: item.formatted_address,
					latitude: item.geometry.location.lat(),
					longitude: item.geometry.location.lng()
				};
			}));
		});
	};
	
	// Returns a function that handles an auto-complete response.
	AutoCompleteSample.create_handleFoundLocation = function () {
		return function (event, ui) {
			var lat = ui.item.latitude;
			var lon = ui.item.longitude;
			var location = new google.maps.LatLng(lat, lon);
			alert(location);
		};
	};
	
	// Setup auto-complete for the below textbox.
	$("#txtAddress").autocomplete({
		// This function gets auto-complete results based on what the user types.
		source: AutoCompleteSample.handleAutocompleteRequest,
		// This function gets called when the user selects a result.
		select: AutoCompleteSample.create_handleFoundLocation()
	});
	
});

Here is some documentation:


QuestionCall Intemediary page while loading page Pin
Prachi Mhatre27-May-11 10:17
Prachi Mhatre27-May-11 10:17 
AnswerRe: Call Intemediary page while loading page Pin
AspDotNetDev27-May-11 10:40
protectorAspDotNetDev27-May-11 10:40 
GeneralRe: Call Intemediary page while loading page Pin
Prachi Mhatre28-May-11 9:53
Prachi Mhatre28-May-11 9:53 
GeneralRe: Call Intemediary page while loading page Pin
AspDotNetDev28-May-11 10:43
protectorAspDotNetDev28-May-11 10:43 
GeneralRe: Call Intemediary page while loading page Pin
Prachi Mhatre28-May-11 12:14
Prachi Mhatre28-May-11 12:14 
GeneralRe: Call Intemediary page while loading page Pin
AspDotNetDev28-May-11 12:16
protectorAspDotNetDev28-May-11 12:16 
QuestionDocuments in SQL Server database Pin
Aptiva Dave27-May-11 7:51
Aptiva Dave27-May-11 7:51 
AnswerRe: Documents in SQL Server database Pin
Not Active27-May-11 8:10
mentorNot Active27-May-11 8:10 
GeneralRe: Documents in SQL Server database Pin
Aptiva Dave27-May-11 8:25
Aptiva Dave27-May-11 8:25 
GeneralRe: Documents in SQL Server database Pin
Aptiva Dave27-May-11 9:57
Aptiva Dave27-May-11 9:57 
GeneralRe: Documents in SQL Server database Pin
Not Active27-May-11 10:11
mentorNot Active27-May-11 10:11 
GeneralRe: Documents in SQL Server database Pin
Aptiva Dave27-May-11 10:29
Aptiva Dave27-May-11 10:29 
GeneralRe: Documents in SQL Server database Pin
Not Active27-May-11 12:08
mentorNot Active27-May-11 12:08 
GeneralRe: Documents in SQL Server database Pin
Aptiva Dave31-May-11 8:51
Aptiva Dave31-May-11 8:51 
QuestionProtect XML from outside access in asp.net Pin
Prasanta_Prince26-May-11 21:04
Prasanta_Prince26-May-11 21:04 
AnswerRe: Protect XML from outside access in asp.net Pin
AspDotNetDev26-May-11 21:47
protectorAspDotNetDev26-May-11 21:47 
GeneralRe: Protect XML from outside access in asp.net Pin
Prasanta_Prince26-May-11 22:59
Prasanta_Prince26-May-11 22:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.