Skip to content

Tarik Billa

  • Web Development
    • html
    • vue.js
    • laravel
    • css
    • javascript
    • jquery
    • node.js
    • php
    • asp.net
  • Programming
    • python
    • java
    • c
    • c++
    • c#
  • git
  • android

razor-declarative-helpers

Can I return a string using the @helper syntax in Razor?

December 11, 2023 by Tarik

Razor helpers return HelperResult objects. You can get the raw HTML by calling ToString(). For more information, see my blog post.

Categories string Tags asp.net-mvc-3, razor, razor-declarative-helpers, string, type-conversion Leave a comment

Why is the HtmlHelper instance null in a Razor declarative @helper method?

June 10, 2023 by Tarik

Using Drew Noakes suggestion, I have come to a workaround that does the trick for now and that can be easily removed once the issue is solved in a newer version of MVC (that is if more stuff isn’t changed that would break it:)) The goal is to be able to use an HtmlHelper inside … Read more

Categories .net Tags .net, asp.net-mvc-3, razor, razor-declarative-helpers Leave a comment

Tarik Billa

Software Engineer
tarikbilla@gmail.com
+8801884414000
  • Reuse a hash in YAMLApril 17, 2024
  • Dockerfile: how to redirect the output of a RUN command to a variable?April 16, 2024
  • How to cd to a directory with spaces in the directory name?April 16, 2024
  • Maximum MIME type length when storing the type in a databaseApril 16, 2024
  • What is the difference between Unit, Integration, Regression and Acceptance Testing?April 16, 2024
© 2026 Tarik Billa