public partial class TestUserControl : System.Web.Mvc.ViewUserControl { protected void Page_Load(object sender, EventArgs e) { this.Label1.Text = "Loaded"; } }2. Put this UserControl all related files into Views/Shared folder
3. Then able to load by Partial view
@Html.Partial("TestUserControl");
No comments:
Post a Comment