Search results for query: *

  • Users: Pablo
  • Content: Threads
  • Order by date
  1. P

    Resolved Delete List element (Model) in Index.cshtml without changing the View

    Hello everyone As mentioned before, I'm working on a Contact List where each one can have a variable number of Telephone objects, in ASP.NET Core MVC. I would like to know how to delete a Contact (and its Telephone objects) from the list (Index.cshtml). I don't know if it would be C#...
  2. P

    Dynamic table for insert/edit/delete phone data into NewEdit Contact view

    Hello all, I'm working on an MVC web application that consists of a Contact list with variable number of phone numbers. In what I'm stuck is in designing a dynamic table (as a part of the NewOrEdit view) that gives me the possibility of adding, editing, and deleting phone number objects...
  3. P

    Question Web App MVC - Dealing with 2 related tables in NewOrUpdate View - how get <input type="text"> value in C# method

    Hi all again I was almost sure I would come back here since I see working in ASP.NET (MVC or whatever) with a DB that has more than one tables related is complex, not the simple like working with only one table. Below I share my NewOrUpdate.cshtml (the View to add a new Contact and his...
  4. P

    How to set FK in OnModelCreating() method EF Core

    Hi all I have been studying CRUD operations in web applications following tutorials (Blazor, MVC, etc), but none of them uses more than one table in the DB. So now I'm trying to test something like an agenda in a web application. So I have two tables (Models), they are: 1) People: IdPerson...
  5. P

    Generic Read Key Method in C#

    Hello, C# Ladies and Guys, I'm needing a generic ReadKey() method (in C#) that is able to read chars as keys like arrows or Ctrl. I know the Console.ReadKey() method but it is from the Console app type, I need one method that is independent on the project type. Yes, I already searched the web...
  6. P

    Project type choice

    Hello, C# Community One issue I'm getting is that in my VS I can choose Empty Project for .Net Framework, but not for .Net 8, and I'm needing an Empty Project for .Net 8. May you help me on this? Thank you. Regards Pablo
  7. P

    Question Problem with NuGet Package in MudBlazor app

    Hello, I managed to install in my VS the MudBlazor Template (updated to .Net 8) for creating projects with MudBlazor already setup, and it works fine. Then I installed the NuGet Packages Microsoft.EntityFrameworkCore version 8.0.6, the *.SqlServer, and the *.Tools. When I wrote the classic...
  8. P

    Question Set up MudBlazor for Blazor Wep App in .Net 8

    Hello I'm again trying to learn Blazor with MudBlazor. The issue now is I can't set up MudBlazor in .Net 8 Blazor Web App. I followed this guide but it doesn't work. https://stackoverflow.com/questions/77530283/install-mudblazor-in-dotnet-8-blazor-project I searched more but didn't find...
  9. P

    Question Modal not showing in Blazor

    Hello, I'm again on my practice with Blazor. The issue now is the Modal I took from Bootstrap web page is not showing when I click the button that should make it appear. This is the code: @page "/" @inject NavigationManager navMgr <!-- Button trigger modal --> <button type="button" class="btn...
  10. P

    Question MudSelect showing Value instead of MudSelect Item - Mudblazor

    Hello again, So I continued practicing with Mudblazor, and as I learnt EFCore I was able to follow a tutorial about CRUD. I have in my Index.razor a form to Edit/Add customers, and a table that shows all of them with the options to edit and delete. When clicked the Edit option, that customer's...
  11. P

    Question Starting Mobile Development with C# (and Android)

    Hello all I am an experienced C# programmer, desktop applications and video games. I would like to get into Mobile development, for example to make an app for my cell phone. By now, the only I know is that a Mobile app file extension is .apk. I don't even know if this is the correct sub forum. I...
  12. P

    Question MudBlazor simple syntax various errors in Cascade Dropdownlists

    Hello all, I'm trying to move to MudBlazor starting by the page with the Cascade Dropdownlists, which before worked perfectly, but I know I have to upgrade to MudBlazor. Here's a screenshot with the errors: The error message says: Argument 2: Cannot convert from method group to...
  13. P

    Question Moving to MudBlazor project, it doesn't recognize the Models namespace

    Hi all, So I was training with Blazor CRUD and so, going quite well, and I created a new MudBlazor project to practice with the best (as suggested cjard), and move all the stuff to it. To be brief, it does recognize everything, the Interfaces namespace (directory), the Services namespace...
  14. P

    Question <input type="text" @bind-value="@client.Name" generating a lot of errors - Blazor

    Hello all, I'm working on the Add/Update page. Before, I had typed just value instead of @bind-value, and it appeared the correct value, but those fields were not updated. (Could it be because it was missing the "two way" binding?). Then I changed to @bind-value as you can see in the code, and I...
  15. P

    Question How to get table row data (such as Id) on same row button click - Blazor

    Hello, How can I get data from a table row (such as Id or other columns) on click method from a button that is in the same row? So I can pass an Id to the Delete method or something like that. This is my .razor file: @page "/ClientList" @using WebAPICountries.Models @using...
  16. P

    Question How to pass data from a page to another in Blazor

    Hi all, So I'm progressing in my web dev learning. Now I'm working on a project that is not from a tutorial, but on my own. I have on my clientList page a click event handler method that takes me to the editClient page, and I have to pass an Id to it, and I can't figure how. My method looks...
  17. P

    Question How access the connection string declared in appsettings.json in Blazor

    Hi, So I was able to add a connection string to the file appsettings.json, but I can't find the way to retrieve it in my 'Service' C# code file which gets data from the DB. What I could know is that I need an IConfiguration object, through whose GetConnectionString() method I would get the...
  18. P

    EF problem in Blazor CRUD tutorial

    Hello, So I'm still trying to learn Blazor, and as I don't find CRUD with ADO tutorials, I went to one that uses EF. First, using the Package Managing Console, I added the Migration Initial succesfully, then when entering Update-Database, I got this message...
  19. P

    Question Moving to MudBlazor - Runtime error in page - I can't see MudTextField

    Hello, I'm trying to practice with MudBlazor doing the same I did before without it (but more complex this time, I added the KeyDown event), and it seems something related to the MudTextField is wrong, because it is not shown in the page (the MudButton is) and at the bottom of the screen it says...
  20. P

    Question MudTextField OnKeyPress event handler Signature (parameters)

    Hi, Can I handle OnKeyPress on MudTextField getting the char before writting it, like in WinForms? How? How would the C# method parameters be? And how to add it inside the MudTextField tag? I have something like this, and tried searching but found nothing, and think I'm missing something...
Back
Top Bottom