how to solve these cacding dropdown with out selection show map?

Posted by Raghuldrag under C# on 4/29/2014 | Points: 10 | Views : 1237 | Status : [Member] | Replies : 1
Hi Friends,

i m doing web application on google geo location depends on the drop down

in aspx page:

<script type="text/javascript">
var markers = [
<asp:Repeater ID="rptMarkers" runat="server">
"title": '<%# Eval("pincode") %>',
"lat": '<%# Eval("Latitude") %>',
"lng": '<%# Eval("Longitude") %>',
"description": '<%# Eval("descp") %>'

in above pincode,lat,long,descp are fetching from my procedure....

alter procedure LAT_TEST_DYNAM0
@dist_id int



create table #temp (pincode varchar(10),latitude numeric(18,10),longitude numeric(18,10),descp varchar(5000))

insert into #temp (pincode,latitude,longitude)
select distinct a.pincode,b.latitude,b.longitude from
ind_cust_det a (nolock) inner join ind_geo_loc b on a.pincode=b.pincode

declare @pin int
declare cur cursor dynamic for select distinct pincode from #temp

declare @sales numeric (18,2)
declare @total numeric (18,2)
declare @des varchar(5000)
declare @cust_id int
open cur

fetch first from cur into @pin

while @@fetch_status=0

set @des=''
set @total=0
set @des='<table border="1"><tr><th>Customer</th><th>Sales</th></tr>'

declare cur1 cursor dynamic for select cust_id,sum(sales) sales from ind_cust_det (nolock) where pincode=@pin group by cust_id

open cur1

fetch first from cur1 into @cust_id,@sales

while @@fetch_status=0
set @des=@des+ '<tr><td align="center">' + convert(varchar,@cust_id) + '</td><td align="center">' + convert(varchar,@sales) +'</td></tr>'
set @total=@total+@sales
fetch next from cur1 into @cust_id,@sales


set @des=@des+ '<tr><td align="center">TOTAL</td><td>' + convert(varchar,@total)+ '</td></tr></table>'

close cur1
deallocate cur1

update #temp set descp=@des where pincode=@pin
fetch next from cur into @pin

close cur
deallocate cur

select * from #temp

drop table #temp

i had the cascading drop down ..... when i choose the state & dist only the marker ll fetch from that and displayed ....

if i m nothing choosed the marker is zero lat ,long its showing error ?

what was the solution if i m nothing choosed i wanna display only india map....

kindly help me friends!!!!!


Posted by: Allemahesh on: 4/29/2014 [Member] [MVP] Silver | Points: 25

Your question is not clear. Can you ex-plane it again.

Raghuldrag, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response