I am currently working on the same hubryd project where I have a WebForm part and an MVC part.
We are trying to get rid of part of WebForms.
The strategy I am facing is:
- Get all the logic from WebForms to BL level in your solution.
- Replace all modal dialogs that do not need feedback results from partial representations of MVC + Razor. This is very easy to do with AJAX. in your interactive WebForm element:
OnClientClick='<%# "showEntityList("+Eval("Id")+"); return false;" %>'
js code that makes an ajax call (I use the jquery dialog behind this function):
function showEntityList(Id) {
dialogSaveCancel(
{
title: "Entity List",
urlPost: '/ControllerName/ControllerMethodName?id=' + Id,
callback:
{
success: function (data, textStatus, jqXHR) {
var url = 'test';
window.location.replace(url);
},
error: function () { }
}
});
};
So, you can get your Razor View in the WebForms part.
- , , MVC - reaplace WebForm RazorView.
, js:
function ShowInNewTab(path) {
window.open(SiteAppRootPath + path, '_blank');
}