Error compiling template "/Designs/SkanskaMaskin/Paragraph/_Share_Product.cshtml"
Line 111: 'IRequest' does not contain a definition for 'GetString' and no extension method 'GetString' accepting a first argument of type 'IRequest' could be found (are you missing a using directive or an assembly reference?)
Line 148: 'IRequest' does not contain a definition for 'GetString' and no extension method 'GetString' accepting a first argument of type 'IRequest' could be found (are you missing a using directive or an assembly reference?)

1 //------------------------------------------------------------------------------ 2 // <auto-generated> 3 // This code was generated by a tool. 4 // Runtime Version:4.0.30319.42000 5 // 6 // Changes to this file may cause incorrect behavior and will be lost if 7 // the code is regenerated. 8 // </auto-generated> 9 //------------------------------------------------------------------------------ 10 11 namespace CompiledRazorTemplates.Dynamic { 12 using System; 13 using System.Collections.Generic; 14 using System.Linq; 15 16 #line 1 "D:\wwwroot\rental.skanska.se\Files\Templates\Designs\SkanskaMaskin\Paragraph\_Share_Product.cshtml" 17 using Softgear.SkanskaMaskin.Data.Business; 18 19 #line default 20 #line hidden 21 22 23 public class RazorEngine_321ec667c7aa44c5820f65ba8fb12101 : Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> { 24 25 #line hidden 26 27 public RazorEngine_321ec667c7aa44c5820f65ba8fb12101() { 28 } 29 30 public override void Execute() { 31 WriteLiteral("\r\n"); 32 33 34 #line 3 "D:\wwwroot\rental.skanska.se\Files\Templates\Designs\SkanskaMaskin\Paragraph\_Share_Product.cshtml" 35 36 37 HandleBarsHelper hbh = new HandleBarsHelper(); 38 String nameInputHtml; 39 String emailInputHtml; 40 String receiverInputHtml; 41 String messageInputHtml; 42 String url; 43 url = Dynamicweb.Frontend.PageView.Current().GlobalTags.GetTagByName("Global:Pageview.Url").Value; 44 45 List<object> inputAttrs = new List<object>(); 46 47 /*Namn*/ 48 inputAttrs.Add( 49 new { 50 prop = "required" 51 } 52 ); 53 54 var inputNameData = new { 55 type = "text", 56 label = "Ditt namn", 57 uid = "sharelist-name", 58 name = "sharelist-name", 59 isFullWidth = true, 60 attrs = inputAttrs 61 }; 62 63 nameInputHtml = hbh.render("form-input/index.hbs", inputNameData); 64 65 /*Email*/ 66 inputAttrs.Add( 67 new { 68 prop = "required" 69 } 70 ); 71 72 var inputEmailData = new { 73 type = "text", 74 label = "Din e-post", 75 uid = "sharelist-email", 76 name = "sharelist-email", 77 isFullWidth = true, 78 attrs = inputAttrs 79 }; 80 81 emailInputHtml = hbh.render("form-input/index.hbs", inputEmailData); 82 83 /*Receiver*/ 84 inputAttrs.Add( 85 new { 86 prop = "required" 87 } 88 ); 89 90 var inputReceiverData = new { 91 type = "text", 92 label = "Mottagarens e-post", 93 uid = "sharelist-receiver", 94 name = "sharelist-receiver", 95 isFullWidth = true, 96 attrs = inputAttrs 97 }; 98 99 receiverInputHtml = hbh.render("form-input/index.hbs", inputReceiverData); 100 101 /*Message*/ 102 List<object> templates = new List<object>(); 103 inputAttrs.Add( 104 new { 105 prop = "required" 106 } 107 ); 108 109 string defaultMessage; 110 var DOMAIN = Dynamicweb.Frontend.PageView.Current().GlobalTags.GetTagByName("Global:Request.Host").Value; 111 defaultMessage = String.Format("Hej\n\nJag har hittat en bra produkt hos Skanska Rental. Ta g\u00E4rna en titt! \n http://{0}/default.aspx?id=3&productid={1}", DOMAIN, Dynamicweb.Context.Current.Request.GetString("pid")); 112 113 templates.Add(defaultMessage); 114 115 116 var inputMessageData = new { 117 type = "text", 118 label = "Meddelande", 119 uid = "sharelist-message", 120 name = "sharelist-message", 121 isTextarea = true, 122 isFullWidth = true, 123 attrs = inputAttrs, 124 template = templates 125 }; 126 var partialPathList = new List<string> { "form-input/textarea.hbs" }; 127 messageInputHtml = hbh.render("form-input/index.hbs", partialPathList, inputMessageData); 128 129 130 #line default 131 #line hidden 132 WriteLiteral("\r\n<!--\r\n<form action=\"/form/shareproduct/confirm\" method=\"post\">\r\n <input type" + 133 "=\"text\" name=\"test\" id=\"test\" value=\"testvalue\" />\r\n <button class=\"Button\" t" + 134 "ype=\"submit\">Skicka tips</button>\r\n</form>\r\n-->\r\n<form"); 135 136 WriteLiteral(" action=\"/form/shareproduct/confirm\""); 137 138 WriteLiteral(" method=\"post\""); 139 140 WriteLiteral(" name=\"share-form\""); 141 142 WriteLiteral(" class=\"js-overlayForm\""); 143 144 WriteLiteral(">\r\n"); 145 146 147 #line 104 "D:\wwwroot\rental.skanska.se\Files\Templates\Designs\SkanskaMaskin\Paragraph\_Share_Product.cshtml" 148 Write(Dynamicweb.Context.Current.Request.GetString("productid")); 149 150 151 #line default 152 #line hidden 153 WriteLiteral("\r\n<div"); 154 155 WriteLiteral(" class=\"Grid Grid--withGutter\""); 156 157 WriteLiteral(">\r\n <div"); 158 159 WriteLiteral(" class=\"Grid-cell u-sizeFull u-md-size1of2 u-lg-size1of2\""); 160 161 WriteLiteral(">\r\n <div"); 162 163 WriteLiteral(" class=\"Overlay-header\""); 164 165 WriteLiteral(">\r\n <div"); 166 167 WriteLiteral(" class=\"Type Input-aligned\""); 168 169 WriteLiteral(">\r\n <h2"); 170 171 WriteLiteral(" class=\"Input-aligned\""); 172 173 WriteLiteral(">Dela via e-post</h2>\r\n </div>\r\n </div>\r\n </div>\r\n <div"); 174 175 WriteLiteral(" class=\"Grid-cell u-sizeFull u-md-size1of2 u-lg-size1of2\""); 176 177 WriteLiteral(">\r\n"); 178 179 WriteLiteral(" "); 180 181 182 #line 114 "D:\wwwroot\rental.skanska.se\Files\Templates\Designs\SkanskaMaskin\Paragraph\_Share_Product.cshtml" 183 Write(nameInputHtml); 184 185 186 #line default 187 #line hidden 188 WriteLiteral("\r\n </div>\r\n <div"); 189 190 WriteLiteral(" class=\"Grid-cell u-sizeFull u-md-size1of2 u-lg-size1of2\""); 191 192 WriteLiteral(">\r\n"); 193 194 WriteLiteral(" "); 195 196 197 #line 117 "D:\wwwroot\rental.skanska.se\Files\Templates\Designs\SkanskaMaskin\Paragraph\_Share_Product.cshtml" 198 Write(emailInputHtml); 199 200 201 #line default 202 #line hidden 203 WriteLiteral("\r\n </div>\r\n <div"); 204 205 WriteLiteral(" class=\"Grid-cell u-sizeFull u-md-size1of2 u-lg-size1of2\""); 206 207 WriteLiteral(">\r\n"); 208 209 WriteLiteral(" "); 210 211 212 #line 120 "D:\wwwroot\rental.skanska.se\Files\Templates\Designs\SkanskaMaskin\Paragraph\_Share_Product.cshtml" 213 Write(receiverInputHtml); 214 215 216 #line default 217 #line hidden 218 WriteLiteral("\r\n </div>\r\n <div"); 219 220 WriteLiteral(" class=\"Grid-cell u-sizeFull\""); 221 222 WriteLiteral(">\r\n"); 223 224 WriteLiteral(" "); 225 226 227 #line 123 "D:\wwwroot\rental.skanska.se\Files\Templates\Designs\SkanskaMaskin\Paragraph\_Share_Product.cshtml" 228 Write(messageInputHtml); 229 230 231 #line default 232 #line hidden 233 WriteLiteral("\r\n </div>\r\n</div>\r\n<div"); 234 235 WriteLiteral(" class=\"Grid Grid--withGutter\""); 236 237 WriteLiteral(">\r\n <div"); 238 239 WriteLiteral(" class=\"Grid-cell u-sizeFull u-textRight\""); 240 241 WriteLiteral(">\r\n \r\n <button"); 242 243 WriteLiteral(" class=\"Button\""); 244 245 WriteLiteral(" type=\"submit\""); 246 247 WriteLiteral(@">Skicka tips</button> 248 249 </div> 250 </div> 251 </form> 252 253 <script> 254 255 function setShareText() { 256 document.forms['share-form']['sharelist-message'].value = document.forms['share-form']['sharelist-message'].value + window.location.href; 257 } 258 window.onload = setShareText(); 259 260 </script>"); 261 262 } 263 } 264 } 265

1 @using Softgear.SkanskaMaskin.Data.Business 2 3 @{ 4 5 HandleBarsHelper hbh = new HandleBarsHelper(); 6 String nameInputHtml; 7 String emailInputHtml; 8 String receiverInputHtml; 9 String messageInputHtml; 10 String url; 11 url = Dynamicweb.Frontend.PageView.Current().GlobalTags.GetTagByName("Global:Pageview.Url").Value; 12 13 List<object> inputAttrs = new List<object>(); 14 15 /*Namn*/ 16 inputAttrs.Add( 17 new { 18 prop = "required" 19 } 20 ); 21 22 var inputNameData = new { 23 type = "text", 24 label = "Ditt namn", 25 uid = "sharelist-name", 26 name = "sharelist-name", 27 isFullWidth = true, 28 attrs = inputAttrs 29 }; 30 31 nameInputHtml = hbh.render("form-input/index.hbs", inputNameData); 32 33 /*Email*/ 34 inputAttrs.Add( 35 new { 36 prop = "required" 37 } 38 ); 39 40 var inputEmailData = new { 41 type = "text", 42 label = "Din e-post", 43 uid = "sharelist-email", 44 name = "sharelist-email", 45 isFullWidth = true, 46 attrs = inputAttrs 47 }; 48 49 emailInputHtml = hbh.render("form-input/index.hbs", inputEmailData); 50 51 /*Receiver*/ 52 inputAttrs.Add( 53 new { 54 prop = "required" 55 } 56 ); 57 58 var inputReceiverData = new { 59 type = "text", 60 label = "Mottagarens e-post", 61 uid = "sharelist-receiver", 62 name = "sharelist-receiver", 63 isFullWidth = true, 64 attrs = inputAttrs 65 }; 66 67 receiverInputHtml = hbh.render("form-input/index.hbs", inputReceiverData); 68 69 /*Message*/ 70 List<object> templates = new List<object>(); 71 inputAttrs.Add( 72 new { 73 prop = "required" 74 } 75 ); 76 77 string defaultMessage; 78 var DOMAIN = Dynamicweb.Frontend.PageView.Current().GlobalTags.GetTagByName("Global:Request.Host").Value; 79 defaultMessage = String.Format("Hej\n\nJag har hittat en bra produkt hos Skanska Rental. Ta g\u00E4rna en titt! \n http://{0}/default.aspx?id=3&productid={1}", DOMAIN, Dynamicweb.Context.Current.Request.GetString("pid")); 80 81 templates.Add(defaultMessage); 82 83 84 var inputMessageData = new { 85 type = "text", 86 label = "Meddelande", 87 uid = "sharelist-message", 88 name = "sharelist-message", 89 isTextarea = true, 90 isFullWidth = true, 91 attrs = inputAttrs, 92 template = templates 93 }; 94 var partialPathList = new List<string> { "form-input/textarea.hbs" }; 95 messageInputHtml = hbh.render("form-input/index.hbs", partialPathList, inputMessageData); 96 } 97 <!-- 98 <form action="/form/shareproduct/confirm" method="post"> 99 <input type="text" name="test" id="test" value="testvalue" /> 100 <button class="Button" type="submit">Skicka tips</button> 101 </form> 102 --> 103 <form action="/form/shareproduct/confirm" method="post" name="share-form" class="js-overlayForm"> 104 @Dynamicweb.Context.Current.Request.GetString("productid") 105 <div class="Grid Grid--withGutter"> 106 <div class="Grid-cell u-sizeFull u-md-size1of2 u-lg-size1of2"> 107 <div class="Overlay-header"> 108 <div class="Type Input-aligned"> 109 <h2 class="Input-aligned">Dela via e-post</h2> 110 </div> 111 </div> 112 </div> 113 <div class="Grid-cell u-sizeFull u-md-size1of2 u-lg-size1of2"> 114 @nameInputHtml 115 </div> 116 <div class="Grid-cell u-sizeFull u-md-size1of2 u-lg-size1of2"> 117 @emailInputHtml 118 </div> 119 <div class="Grid-cell u-sizeFull u-md-size1of2 u-lg-size1of2"> 120 @receiverInputHtml 121 </div> 122 <div class="Grid-cell u-sizeFull"> 123 @messageInputHtml 124 </div> 125 </div> 126 <div class="Grid Grid--withGutter"> 127 <div class="Grid-cell u-sizeFull u-textRight"> 128 129 <button class="Button" type="submit">Skicka tips</button> 130 131 </div> 132 </div> 133 </form> 134 135 <script> 136 137 function setShareText() { 138 document.forms['share-form']['sharelist-message'].value = document.forms['share-form']['sharelist-message'].value + window.location.href; 139 } 140 window.onload = setShareText(); 141 142 </script>