HTML helpers in Webform?

后端 未结 2 880
Happy的楠姐
Happy的楠姐 2021-01-18 22:27

I have a old site that I want to use something like HTML helpers to generate special HTML(in this case complexed buttons). I know how this works in ASP.NET MVC but how can I

相关标签:
2条回答
  • 2021-01-18 23:07

    Put Helpers.cs in your App_Code folder then you can call it like so from your aspx file:

    <div class="example>
        <%= Helpers.Label1("some", "text") %>
    </div>
    
    0 讨论(0)
  • 2021-01-18 23:19

    At your solution. Add a special folder ASP.net Folder called code. Then paste your Helpers.cs file at it. Then you can access it.

    0 讨论(0)
提交回复
热议问题