Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

razor-pages

Stop .cshtml rendering on post

September 4, 2022 by Magenaut

Say I had this page in ASP.NET RazorPages:

Categories ASP.NET, Q&A Tags asp.net, asp.net-mvc, c#, razor-pages Leave a comment

How to POST in .Net Core MVC

September 4, 2022 by Magenaut

i have a login page with Username and Password inputs and also a submit button. I want to call a method in my Controller that checks if the data matches and shows the result. how do i call that method? I tried the following but it didnt work it passes those as parameters

Categories ASP.NET, Q&A Tags asp.net, asp.net-core, asp.net-mvc, model-view-controller, razor-pages Leave a comment

Index was out of range error. But when i excecute item.count() returns 1

September 4, 2022 by Magenaut

I’m having issues with razor, I’m trying to access the first element of a list. But when I try to cast an element with item2.hijos[0].ruta, I get an error.

Categories ASP.NET, Q&A Tags .net, asp.net, asp.net-mvc, c#, razor-pages Leave a comment

Cannot Save or Use Binding Model Data on OnPost Passed By Form in Razor Page

September 4, 2022 by Magenaut

I have a problem in EditUserProfile in razor page, so there is no problem showing the user information in the page, but when I press edit button, I get user information through the form but I can’t save or user it.

Categories ASP.NET, Q&A Tags asp.net, asp.net-core, c#, model-binding, razor-pages Leave a comment

Access Messages from Message Center

September 4, 2022 by Magenaut

Hi I’m try to display the top 5 messages from the message center on the homepage. But I’m not sure what I’m doing wrong. I try to get the messages from the message view model here is my code.

Categories ASP.NET, Q&A Tags asp.net, asp.net-core, c#, javascript, razor-pages Leave a comment

How do I get Scope_Identity from new record in Entity Framework?

September 4, 2022 by Magenaut

I have tried following examples that look fairly simple for getting the id of a primary key after inserting a new record for use in other tables that need to use it as a foreign key, but despite following these examples to the letter I am still getting a null reference exception for the id.

Categories ASP.NET, Q&A Tags asp.net, asp.net-core, c#, entity-framework, razor-pages Leave a comment

Use single error message template for all invalid properties

September 4, 2022 by Magenaut

Imagine a razor page with a Form that have many inputs that user fills them.

Categories ASP.NET, Q&A Tags asp.net, asp.net-core, jquery-form-validator, modelstate, razor-pages Leave a comment

How to remove Page URL from routing path in ASP.NET?

September 4, 2022 by Magenaut

I have an Image folder with some files, and a table with the path of this images. When trying to list the images like this:

Categories ASP.NET, Q&A Tags asp.net, asp.net-core, razor, razor-pages, web Leave a comment

Function does not execute on razor page when called from javascript file

September 4, 2022 by Magenaut

I have been trying to call my function in the ‘onsubmit’ part of my form however, whenever I execute my application the alert is not appearing when searching an empty string.

Categories ASP.NET, Q&A Tags asp.net, javascript, razor, razor-pages, web Leave a comment

How upload image in CKEditor 5 With asp.net core razor Pages

September 4, 2022 by Magenaut

How upload image in CKEditor 5 With asp.net core razor Pages

Categories ASP.NET, Q&A Tags asp.net, asp.net-core, javascript, razor-pages Leave a comment
Older posts
Page1 Page2 Next →
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress