Equivalent to PHP's include in C# -


what equivalent command php's include() in c# ?

for example, php's include used : include("ex.php");

can same in c#?

if mean in asp.net using c# can create user control (.ascx) , add in .aspx page.
if doing mvc can create partial view.

the closest thing can think of after creating ascx user control named "myusercontrol"

in page_load or pre_render :

myusercontrol cont = new myusercontrol(); this.controls.add(cont); 

Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

html - Instapaper-like algorithm -

c# - How to execute a particular part of code asynchronously in a class -