22,449 questions with .NET-related tags

Sort by: Updated
0 answers

what the "is" operator do exactly if the variable before it is a string and the one after it is a const string, in c#

Hello, I recently found about the "is" operator in C# and found that it sees if the variable is compatible for a data type or not but when I added to make this code. string s1 = "hi"; Const string s2 = "hi"; …

.NET
.NET
Microsoft Technologies based on the .NET software framework.
2,998 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
9,718 questions
asked 2024-01-14T20:24:48.94+00:00
Ahmed Ali Eid 0 Reputation points
1 answer

How Redirect To Not Found Without Change Url In Blazor .Net 8

Hi, How to redirect user to not found when page is not exists without change url in blazor ? Like this link : git not found

Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,272 questions
asked 2024-01-14T07:12:16.04+00:00
Mahdi Elahi 21 Reputation points
edited a comment 2024-01-14T20:10:05.4+00:00
Mahdi Elahi 21 Reputation points
1 answer

Why is the IOptionsMonitor OnChange callback method called twice instead of one time when monitoring XML config changes

I want to call another method every time the XML config file changes any value and is saved. This code works but the OnChange method is called twice each time: If I attempt to use the implementation of IDisposable on the OnChange then the code does not…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
2,998 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,906 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
9,718 questions
asked 2024-01-14T19:31:08.8733333+00:00
Silent Noise 26 Reputation points
commented 2024-01-14T19:58:04.7866667+00:00
Silent Noise 26 Reputation points
5 answers

How do I save a file to SQL Server using Razor forms?

I have built a web application that connects to a local SQL Server. I would like to use the web form to save a file in the database. I am experiencing an error related to the model types and provider types. When I use a byte array type for the…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
660 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,906 questions
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
11,894 questions
asked 2023-12-18T22:13:08.65+00:00
Robert Brown 0 Reputation points
commented 2024-01-14T18:37:30.5766667+00:00
Iris236 0 Reputation points
3 answers

Why add days notice period to current date built in function C# not accurate add days correctly?

I working on a C# console app. I face an issue - the built-in add days function does not add days correctly when calculating notice period plus date today. How to solve this issue? Suppose I add 30 days to today's date: 12/01/2024 + 30 = 10/02/2024 12…

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,091 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
9,718 questions
asked 2024-01-12T20:53:05.2833333+00:00
ahmed salah 3,211 Reputation points
edited an answer 2024-01-14T18:34:12.2466667+00:00
Albert Kallal 4,386 Reputation points
1 answer

Is the Google components binding libraries for iOS still supported / maintained?

Nuget packages prefixed Xamarin.Google.iOS.* and Xamarin.Firebase.iOS.* are built from this repository: https://github.com/xamarin/GoogleApisForiOSComponents The native libraries these bindings are built on are 2+ years old and are becoming unusable.…

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,228 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
2,370 questions
asked 2024-01-12T21:25:38.47+00:00
AdamEssenmacher 0 Reputation points
commented 2024-01-14T18:17:19.22+00:00
AdamEssenmacher 0 Reputation points
0 answers

ASP.NET Identity library - delete user does not delete their claims

Hi all; I am using the ASP.NET Core Identity library in Blazor server side version 8. The library provides a page for a user to delete themselves from the system. When they are deleted - it does not delete any claims they have. How can I have it delete…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,906 questions
asked 2024-01-14T18:15:31.95+00:00
David Thielen 1,636 Reputation points
1 answer

How to make speak stuff no selection by true or false if speak stuff is null or no values ?

I work on asp.net mvc web app I face issue i can't make check box no selection if value of speakstuff is null so i will not make default value false i need speak stuff when display for first time of user to display as null so how to change my code to…

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,091 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
9,718 questions
asked 2024-01-14T12:11:30.44+00:00
Ahmed Salah Abed Elaziz 250 Reputation points
edited a comment 2024-01-14T17:04:02.1866667+00:00
Pinaki Ghatak 655 Reputation points Microsoft Employee
1 answer

How to implement remember me in the login page?

Hi All, How to implement the remember me? what I expect is if the user select the "remember me" then if they logged out and come back again they should not need to enter their user email and password. I use NetCore 6 C# below, the IsPersistent…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,906 questions
asked 2024-01-14T15:00:15.28+00:00
Dondon510 221 Reputation points
edited an answer 2024-01-14T16:39:25.6433333+00:00
AgaveJoe 25,076 Reputation points
0 answers

.NET Technology Stack latest Diagram

Hi. Please can someone point me to the latest (2024) .NET Technology Stack diagram? I have searched the web but found nothing about .NET Core and ML.NET in those diagrams. Thanks.

.NET
.NET
Microsoft Technologies based on the .NET software framework.
2,998 questions
asked 2024-01-14T15:39:10.2233333+00:00
Arshad Nazeer 21 Reputation points
edited the question 2024-01-14T15:39:37.1033333+00:00
Arshad Nazeer 21 Reputation points
3 answers

How to implement "Remember Me" option in a login page?

Hi, I want to have "remember me" option in my login page, how to implement it? any example that I can follow? Environment: ASP MVC NetCore 6 thanks

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,906 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,091 questions
asked 2023-12-18T15:22:20.59+00:00
winanjaya 141 Reputation points
commented 2024-01-14T14:23:54.5333333+00:00
AgaveJoe 25,076 Reputation points
1 answer

How to improve the role management in Blazor Server?

Hi, I am working on a Blazor Server application. I am using identity management. I have 2 issues to get help. In my application, I have these roles: string[] roles = new string[] { "Administrators", "User", "Accountant",…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,906 questions
Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,272 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
9,718 questions
asked 2024-01-13T11:33:36.54+00:00
Cenk 936 Reputation points
commented 2024-01-14T12:57:48+00:00
AgaveJoe 25,076 Reputation points
1 answer

How to display on a label a timer counting back 5 minutes ? the code is not working.

in the form1 designer I added a timer. i can see that it's getting to the tick event and execute the UpdateTimer but the timer itself does nothing it stay on 05:00:00 and never start counting backward. so the tick event does work when i start the timer…

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,779 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
9,718 questions
asked 2024-01-14T11:57:32.9233333+00:00
jdoe doe 20 Reputation points
answered 2024-01-14T12:07:08.4433333+00:00
Pinaki Ghatak 655 Reputation points Microsoft Employee
1 answer

Using tinymce RichTextbox to insert texts and images into database and display same on a web page

I am trying to insert written articles with descriptive images into database, so that when user open to reads, the user will be able to see images that support the article. Ultimately, I am trying to have almost the same thing as seen on this community's…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
2,998 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,091 questions
asked 2024-01-11T23:10:14.97+00:00
Donald Symmons 2,546 Reputation points
edited a comment 2024-01-14T10:27:31.73+00:00
Donald Symmons 2,546 Reputation points
3 answers

Filtering a ComboBox in a DataGrid based on another combobox in the datagrid in WPF C#?

In my Example Here i have a 3 ComboBoxes in a Datagrid displayoing Countries, Provinces and Districts respectively.How can i Filter the Provinces by Countries and Districts by Provinces in such a way that when the user selects a country he only gets the…

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,595 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
9,718 questions
XAML
XAML
A language based on Extensible Markup Language (XML) that enables developers to specify a hierarchy of objects with a set of properties and logic.
728 questions
asked 2024-01-07T16:23:22.5066667+00:00
Mesh Ka 300 Reputation points
edited a comment 2024-01-14T10:08:24.35+00:00
Peter Fleischer (former MVP) 18,656 Reputation points
2 answers

How to create and use element's MouseEnter event handler programmatically?

WPF, Net Core 8. I've read everything in the internet related to events, all MS docs and a C# book, but have no idea how to use it with Mouse events in WPF. How to implement this logic: create Border/Panel elements in C# (not XAML) create a custom…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
2,998 questions
Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,595 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
9,718 questions
asked 2024-01-11T08:16:16.4633333+00:00
MSCollege3000 85 Reputation points
commented 2024-01-14T10:07:47.6633333+00:00
MSCollege3000 85 Reputation points
1 answer

Get administrative capacity when you use ServiceController.

Hi, As note: If you start/stop services. You will most likely use the ServiceController component in an administrative capacity. How to get administrative capacity when you use ServiceController. Thanks,

.NET
.NET
Microsoft Technologies based on the .NET software framework.
2,998 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
2,370 questions
asked 2024-01-10T09:51:15.7833333+00:00
דני שטרית 1,901 Reputation points
commented 2024-01-14T09:08:29.4966667+00:00
דני שטרית 1,901 Reputation points
0 answers

Error : Normalizing '_blazor' to ... in balzor .net 8

Hi, My website is worked correctly and it's web app blazor 8 but when run project i have this error in inspect element ? what is the problem ?

Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,272 questions
asked 2024-01-14T07:11:34.2966667+00:00
Mahdi Elahi 21 Reputation points
0 answers

asp-append-version="true" in blazor .net 8

Hi, How to cache static files in blazor .net 8 ? we used asp-append-version="true" in last , but how cache these static files ?

Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,272 questions
asked 2024-01-14T07:10:19.3733333+00:00
Mahdi Elahi 21 Reputation points
0 answers

Consuming ML NET cuda GPU trained model on a system without cuda GPU

Greetings. Am I able to train Object Detection model using Visual Studio Model Builder with local GPU (supports cuda) parameter and then consume the model on a system without CUDA GPU (only CPU)?

.NET Machine learning
.NET Machine learning
.NET: Microsoft Technologies based on the .NET software framework.Machine learning: A type of artificial intelligence focused on enabling computers to use observed data to evolve new behaviors that have not been explicitly programmed.
141 questions
asked 2024-01-14T06:38:39.25+00:00
Rex Burton 0 Reputation points