Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Webforms block in MVC site

Vote:
 

We have an task to integrate a backend advertisement solution into our project, but the code provided is Webforms.. There is no scope at this stage to update this to MVC..

Is is possible to create a block that uses Webforms within an MVC EPiServer project?

Thanks
Danny

 

 

#84786
Apr 07, 2014 15:29
Vote:
 

MVC does not support ViewState, the WebForms page lifecycle, webforms postbacks so in general it will not work.

However if you google for "WebForms usercontrols in MVC" you can see that there are ways to achieve it, often creating a fake WebForms page and then load the user control to it and then capture the output in a TextWriter. I would however recommend to try to convert to MVC instead.

#84821
Apr 08, 2014 6:09
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.