views:

38

answers:

1

Explanation of scenario:

I have a jquery window that will load up with a map control. This map control is a shared control in an asp.net MVC application. The way I've been told by Jquery developers is to use a $('').load(''); function to call into a controller which returns the control. Is this the best way? If so, how do i use the controller to return the control and in what format do i return it.

If this way is not right, could you please suggest an alternate way with tutorials to accomplish this please.

Thanks.

A: 

Just create partial view containing this control and define action:

public PartialViewResult MapControl(params)
{
    //Prepare model
    return PartialView("PartialViewName", model);
}

Then you can use jQuery.load() method. How does this control work?

LukLed
Its a map control. the user is supposed to select a location on the map and the control pass back addresses to the jquery window.
Shawn Mclean
You just have to return html containing this control. How do you use it now? Show us some code containing map.
LukLed