views:

74

answers:

2

Hello!

I am trying to figure out how to use/create a custom control in ASP.NET MVC 2.

I created a custom control earlier and compiled it (ccontrol.dll), the control renders a div, textbox and a button + some javascript in order to post a comment on the website. It could be a static aspx page that i wanted to allow my visitors to add a comment to. I would then drag my control from the toolbar to the aspx page and run it, it would then render all the code needed on the webpage including fetching the data from a datasource and displaying that inside the div. The user could also just type in a comment and press the button to save it to the datasource.

Is this possible to convert to MVC 2? Any good tutorial that covers custom controls and MVC 2? (Ideally would be if the control could be made into a .dll file that i then could reuse on future webpages)

How do i write a custom control the mvc way? Any good tutorials on the topic?

+2  A: 

No it is not possible to use custom controls in ASP.NET MVC. you need to re-write in MVC way

Adeel
Just on a side note: I think I saw an article once on how you "could" use an ASPX custom control in MVC but it was just to see if it was possible but due to the differences in technology it had almost no real world usage.
Paul Hadfield