{"id":2240,"date":"2022-08-30T15:23:13","date_gmt":"2022-08-30T15:23:13","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/01\/05\/access-webviewpage-from-custom-html-helper-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:23:13","modified_gmt":"2022-08-30T15:23:13","slug":"access-webviewpage-from-custom-html-helper-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/access-webviewpage-from-custom-html-helper-collection-of-common-programming-errors\/","title":{"rendered":"Access WebViewPage from custom HTML Helper-Collection of common programming errors"},"content":{"rendered":"<p>I&#8217;ve got a ASP.NET MVC 3 Razor Web Application.<\/p>\n<p>I&#8217;ve got a <code>WebViewPage<\/code> extension:<\/p>\n<pre><code>public static bool Blah(this WebViewPage webViewPage)\n{\n   return blah &amp;&amp; blah;\n}\n<\/code><\/pre>\n<p>And i want to access this from my <code>HtmlHelper<\/code> extension:<\/p>\n<pre><code>public static MvcHtmlString BlahHelper(this HtmlHelper htmlHelper, string linkText, string actionName)\n{\n   \/\/ how can i get access to the WebViewPage extension method here?\n}\n<\/code><\/pre>\n<p>I can of course duplicate the functionality of the <code>WebViewPage<\/code> extension if i had to, but just wondering if it&#8217;s possible to access it from the HTML helper.<\/p>\n<p id=\"rop\"><small>Originally posted 2014-01-05 09:31:40. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve got a ASP.NET MVC 3 Razor Web Application. I&#8217;ve got a WebViewPage extension: public static bool Blah(this WebViewPage webViewPage) { return blah &amp;&amp; blah; } And i want to access this from my HtmlHelper extension: public static MvcHtmlString BlahHelper(this HtmlHelper htmlHelper, string linkText, string actionName) { \/\/ how can i get access to the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2240","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2240","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=2240"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2240\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=2240"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=2240"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=2240"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}