asp.net mvc - Convert WebForm VB Web Application to MVC C# gradually -
we have vb web form application , wanting migrate c# mvc. rather doing total rewrite wanting move project @ time.
i know possible have hybrid project webforms , mvc detailed below:
http://blog.falafel.com/integrating-aspnet-mvc-4-into-existing-web-forms-applications/
but problem have if outer pages of web application remain vb/asp.net web forms , when user clicks on area i.e. button has been rewritten in c#/razor mvc how load / direct user , render razor views within web forms.
can render razor view within webforms?
if not can direct new tab?
any ideas how ?
thanks
i working on same hubryd project have webform part , mvc part.
we seek rid off webforms part.
the strategy come out is:
get logic webforms bl layer in solution replace modal dialogs not need post results mvc+razor partial views. easy via ajax. in webform clickable element:onclientclick='<%# "showentitylist("+eval("id")+"); homecoming false;" %>'
js code create ajax phone call (i utilize jquery dialog behind 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 can razor view in webforms part.
the lastly when easy parts replaced mvc partial views reaplace webform razorview.if want new tab can utilize js:
function showinnewtab(path) { window.open(siteapprootpath + path, '_blank'); }
c# asp.net-mvc vb.net razor webforms
No comments:
Post a Comment