i am migrating a website from asp to asp.net. i have some asp pages that have this in them:
<!--#include file="inc_search_form.asp" -->
what is the translation for doing this in asp.net?
i am migrating a website from asp to asp.net. i have some asp pages that have this in them:
<!--#include file="inc_search_form.asp" -->
what is the translation for doing this in asp.net?
the best alternative would probably be to create an ASCX file or in other words: a web user control.
You probably want to put the code into a user control and then use either Html.RenderPartial() or Html.RenderAction() to include that in whatever view you wish.
A good write-up on the pros/cons of each of these methods can be found here: http://devlicio.us/blogs/derik_whittaker/archive/2008/11/24/renderpartial-vs-renderaction.aspx
Literally it's the same: <!--#include file="inc_search_form.aspx"-->
. But you'd better rewrite the inc_search_form
to a user control as these other guys suggest.