HtmlHelpers are really useful, also i was using AjaxHelpers untill i wanted to do something they can't... so now i'm prefering jquery+javascript, but i don't like to write in javascript (mayby because i never know it as good as i wanted) and to make life easier i wanted to implement something like JQueryHelper, but right now i don't know how
I wanted to use inside of "Helper" resolved URL's, because most methods would just pass data to controllers etc... and update some parts of UI, so i'd like to create something like AjaxHelper, but based on JQuery, not MSScripts.
What should I include in such class? how can i get context, url's and generate proper javascript code which can by dynamicly injected into ex.
<div onclick=JQuery.Action("<ActionName>", "<Controller>", new { param1, param2}, <Id to Update>)> My Div</div>
How is it implemented in HtmlHelper or AjaxHelper?
Edit: I've tried few simple implementation, but i think I'm lack of knowledge and don't know how to implement class with extensions exacly.
I've ClassA(class) and ClassAExt(extensions): I've something like that:
static public class ClassAExt{
public static MvcHtmlString Method(this ClassA classA) {
}
}
But in View(), when I'm using ClassAExt.Method() i have to pass also instance of ClassA (in helpers Ajax and Html this argument is grey (optional? not needed?), how to get such effect).