Error compiling template "Designs/SkanskaMaskin/Paragraph/_Form_Share_Product_Confirm.cshtml"
Line 10: The type or namespace name 'StreamReader' could not be found (are you missing a using directive or an assembly reference?)
Line 10: The name 'HttpContext' does not exist in the current context
Line 13: The name 'HttpContext' does not exist in the current context
Line 14: The name 'HttpContext' does not exist in the current context
Line 15: The name 'HttpContext' does not exist in the current context
Line 16: The name 'HttpContext' does not exist in the current context

1 @using Newtonsoft.Json.Linq; 2 @using Softgear.SkanskaMaskin.Data.Business 3 @{ 4 String sharelistName; 5 String sharelistEmail; 6 String sharelistReceiver; 7 String sharelistMessage; 8 9 10 String input = new StreamReader(HttpContext.Current.Request.InputStream).ReadToEnd(); 11 JObject json = JObject.Parse(input); 12 13 sharelistEmail = HttpContext.Current.Server.UrlDecode(Convert.ToString(json["sharelist-email"])); 14 sharelistReceiver = HttpContext.Current.Server.UrlDecode(Convert.ToString(json["sharelist-receiver"])); 15 sharelistMessage = HttpContext.Current.Server.UrlDecode(Convert.ToString(json["sharelist-message"])); 16 sharelistName = HttpContext.Current.Server.UrlDecode(Convert.ToString(json["sharelist-name"])); 17 18 19 sharelistMessage = sharelistMessage.Replace("\n", "<br/>"); 20 21 22 /* Skicka mailet*/ 23 MailManager.send(sharelistReceiver, "noreply@maskinuthyrning.skanska.se", "", "Tips", sharelistMessage, null, sharelistName); 24 25 26 27 28 } 29 <div class="Grid Grid--equalPush Grid--withGutter"> 30 <div class="Grid-cell u-sizeFull u-md-size1of2 u-lg-size1of2"> 31 <div class="Type"> 32 <h2 class="Input-aligned">Produkten är delad!</h2> 33 <p>Här informationen som skickades:</p> 34 </div> 35 </div> 36 <div class="Grid-cell Grid--push u-sizeFull u-md-size1of2 u-lg-size1of2"> 37 <div class="Type"> 38 <h4>Ditt namn</h4> 39 <p>@sharelistName</p> 40 </div> 41 </div> 42 <div class="Grid-cell u-sizeFull u-md-size1of2 u-lg-size1of2"> 43 <div class="Type"> 44 <h4>Din-epost</h4> 45 <p>@sharelistEmail</p> 46 </div> 47 </div> 48 <div class="Grid-cell u-sizeFull u-md-size1of2 u-lg-size1of2"> 49 <div class="Type"> 50 <h4>Mottagerens-epost</h4> 51 <p>@sharelistReceiver</p> 52 </div> 53 </div> 54 <div class="Grid-cell u-sizeFull"> 55 <h4>Meddelande</h4> 56 <div class="Type u-textNoWrap"> 57 <p>@sharelistMessage</p> 58 </div> 59 </div> 60 </div> 61 <div class="Grid Grid--withGutter"> 62 <div class="Grid-cell u-sizeFull u-textRight"> 63 <button class="Button js-overlayClose">Ok, jag förstår</button> 64 </div> 65 </div>