Hi jjrdk,
Thanks for your replay.
I tried using GridView to work as good as SideBar, but i think GridView has some limitations that i am facing.
Now you mentioned in one of your post of attaching javascript to one of the web control events. Forexample .Attributes.Add("onclick",GMap.PanTo(GoogleLatLng));. I tried setting this for GridView in its RowCommand event. The problem is since Attributes.Add registers the script on the event and the script doesnt get executed immediately and it only gets activated if i execute click event second times. What i wanted was to execute javascript immediately.
Suppose i have the following GridView
<ID> <Lat> <Lng>
1 -37.888 144.6666
2 -34.1223 145.4566
3 -56.3333 145.56777
The ID are as hyperlinks. Now when i click say link 2, it Should get its LatLng values and pan Map to that particulat point.
Now in RowCommand event I have put the following line GridView.Attributes.Add("onclick",GMap.Panto(new GoogleLatLng(<Lat>,<Lng>)). Under this scenario, when i click link 2, nothing happens as the javascript is only being registered, and it didnt execute immediately. Now lets suppose i click link 1, now the map will move to first event (link 2) that i clicked and not to the link that i have clicked now (link 1). Same things happens when i click link 3 and map pans to Lat,Lng of event 2. So map moves to last event Points rather moving to current link's Lat,Lng.
You also mentioned using Helper class HandleClientEvent method, but i coudnt able to figure out how and where to put that method.
Could you help me finding a way of executing these javascript PanTo() straight away, the same way The SideBar_Click event takes javscripts as return value, and it executes it when that event gets trigged.
Thanks in Advance.
Haroon