You can't use the asp placeholder control with ASP.NET MVC. Almost all controls require view state, which ASP.NET MVC doesn't support.
How view hmlTable in asp.net mvc?
-
30-05-2022 - |
Question
Can I use HtmlTable class in asp.net MVC?
I created HtmlTable object in Controller class:
var Table1 = new HtmlTable();
How to view it in the web page?
When I use:
PlaceHolder1.Controls.Add(Table1);
in Controller class
and
<asp:placeholder id="PlaceHolder1" runat="server"></asp:placeholder>
in index.cshtml
I have warning "Unrecognized namespace 'asp'"
How bind PlaceHolder1
from Controller class and placeholder id="PlaceHolder1"
from View?
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow