Creating asp.net MVC custom controls
===

I'm currently in the process of migrating one of our WPF applications to MVC as a proof of concept - one thing we have a lot of is custom controls..

What I'm hoping you guys can help me with is some resources on how to get started and how exactly they should be structured for advanced things.

I've looked around so far and it seems you create use extension methods to render your HTML - which is all fine.

here is my first scenario - any advice, tips, resources and help would be brilliant!

Search Provider: this isn't just an autocomplete box, it has advanced options that trigger modal views etc .. what I need is to be able to bind this to an object on the view model..something like this

       
            @Html.SearchProviderFor(model => model.NameObject, "NameSearch");

hopefully - this would update the modal with the complex object the search provider will return.

what exactly is the best way to "For" extensions? and how is the best way to approach creating custom controls that are just not "display this like that" :) ?

I'm sorry if the question is abit fuzzy but I'm hoping you guys can make it out!

cheers.
ste.

