Dave Knipper Was Here

How to Use Old ASP.NET Web Form Server Controls in ASP.NET MVC applications

Here's how to use old ASP.NET Web Form server controls within ASP.NET MVC applications. The following will use an MVC Html Helper to call a static method on a server control. This method will render the control in the background and return the HTML to the ASP.NET MVC application.

1. Modify you ASP.NET Web Form server control. Add a static method that will return the ASP.NET Web Form server control's markup. This method will take arguments for any properties you need to fill in the ASP.NET Web Form server control to make it render properly (or anything else). 2. Create the MVC Html Helper Extension. This method will call the GetMyServerControlControlMarkup(string innerText) method above and return the MyServerControl's Html Markup. 3. Use in the view:

Comments (1) -

  • property hunter

    3/23/2020 6:18:33 AM |

    Great looking web site. Presume you did a bunch of your very own html coding
    We at Addhunters shifted this service to a level much higher than the broker concept. you can see more details like this article <a href="";>Property for sale Best in lusail</a>