Recent content by Permudious

  1. Permudious

    c# ASPNET rightclick event

    Seems like this is working for me :-)
  2. Permudious

    c# ASPNET rightclick event

    Is not working, when I right click now, nothing comes up.
  3. Permudious

    c# ASPNET rightclick event

    I added the code HTML <button id="[email protected]" class="na">@Cardholder<p class="rmlv">@Person.Id</p></button> JS document.addEventListener('contextmenu', function (e) { e.preventDefault(); var div = document.getElementById('myDiv'); var divid =...
  4. Permudious

    c# ASPNET rightclick event

    Never used that before, I only worked with foreach 😅
  5. Permudious

    c# ASPNET rightclick event

    Hi Damien, I understand. But since it's in a foreach where in my script can I say to use that id? Let's say I can add id="myDiv-" + Person.Id
  6. Permudious

    c# ASPNET rightclick event

    Goodmorning Guys, I am developing a webpage which works fine. Now I would like to create a right click event, I did already some research. but can't find the solution which will fit for me. When I rightclick on a button I would like to see the name of the button, but when I do this on the...
  7. Permudious

    c# JsonConvert SerializeObject fails

    Not sure I could use that one. What I am trying is bind 4 kind of values (27.0, 27, 26.8, 26) to names ( TemperatureAquarium, TemperatureAquariumShrt, TemperatureSump, TemperatureSumpShrt) I can add them static for now, but somehow they have to add in a list first right? before I can serialize...
  8. Permudious

    c# JsonConvert SerializeObject fails

    Seems like I have to use JToken.Parse. But when I do that, I still got some backslashes and \r\n as well string json = JsonConvert.SerializeObject(TemperatureList, Formatting.Indented); var jsonreturn = JToken.Parse(json); return jsonreturn.ToString(); "[\r\n {\r\n...
  9. Permudious

    c# JsonConvert SerializeObject fails

    Hereby the code csResponse response = new csResponse(); public class csResponse { public int StatusCode { get; set; } public string ErrorMessage { get; set; } } public class csTemperature { public string TemperatureAquarium { get; set; } public string TemperatureAquariumShrt...
  10. Permudious

    c# JsonConvert SerializeObject fails

    Good evening, I am developing a Web API for the first time, where I should like expect a JSON output. Whatever I try with a return I still have an invalid response. This is the output...
  11. Permudious

    C# Razor foreach with shopping cart

    Hi Jay, Yes every Product has its own ProductId, there were no errors in the console so far I've seen. I solve it to add the simple JS inside the foreach below my button to add them in the cart.
  12. Permudious

    C# Razor foreach with shopping cart

    Goodmorning, I am trying to build a webshop where I've got an issue to add items to a cart. In my case I have 3 simple Items (Cookies, Cakes and Donuts) and only the first item will be added in the cart by pressing on the add cart button. I really do not see why it is not working. <div...
  13. Permudious

    table printing

    So if I understand you correctly I have to add this inside my site.css and than it should work? @media print { body { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; } table { background-color: blue; } td {...
  14. Permudious

    table printing

    And what if the style is inside the html? Or like the CodePen view?
  15. Permudious

    table printing

    Hi all, I was wondering if I can print a table inside HTML, I am able to do a print preview but I can't find where I can add some style. Below my code; I also made a codepen project, which will be easier to view. https://codepen.io/Permudious/pen/oNJrwLj <div class="left"> <div...
Top