Microsoft Q&A

.NET

20,638 questions

Microsoft Technologies based on the .NET software framework.

Browse all .NET tags

20,638 questions with .NET-related tags

Sort by: Updated
2 answers

Conditional validation depending which MVC button pushed

I have a scaffolded form in MVC with two buttons, Save and Submit. I want conditional validation: Save, no validation; Submit, validation. In the cshtml I have: ... <td> @Html.EditorFor(model => model.DSCRPTN, new { htmlAttributes = new…

ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
987 questions
asked 2023-09-25T13:56:00.5533333+00:00
J Fisher 0 Reputation points
edited an answer 2023-09-25T17:00:48.0266667+00:00
Bruce (SqlWork.com) 44,301 Reputation points
2 answers

how to use script files in blazor project inside index.html?

I have a blazor webassemly project , I want to use javascript files , I put them in wwwroot folder and call them in index.html by thos way <script src="/js/bracket.js"></script> I am sure the path is correct but also not working…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
2,047 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,560 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,105 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.
8,969 questions
asked 2023-09-25T07:15:58.0533333+00:00
Haneen Al-fakhry 0 Reputation points
answered 2023-09-25T16:51:24.73+00:00
Bruce (SqlWork.com) 44,301 Reputation points
1 answer

Call Webapi JWT

Capturebearer.JPG Capturepostman.JPG Capturepostman.JPG The Auth Controller C:\Users\allam\source\repos\VisitsApi\VisitsApi\Controllers\AuthController.cs Returns a Token . The call to https://localhost:7070/api/Visits works in Postman …

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,560 questions
asked 2023-09-25T13:18:05.5+00:00
Dotnet Engineer 260 Reputation points
answered 2023-09-25T16:25:17.5566667+00:00
Bruce (SqlWork.com) 44,301 Reputation points
0 answers

WPF Tabcontrol Resizing Issue

Hi All, I have a Tabcontrol inside grid which is inside WPF page. I want Tabcontrol to resize to complete width and height of page. I have set grid height and width to "*" and horizontalalignment and verticalalignment of tabcontrol to…

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,477 questions
asked 2023-09-25T16:12:14.4066667+00:00
Pratham Jain 161 Reputation points
0 answers

How do I programmatically "restart" an Android app in.Net maui?

How do I programmatically "restart" an Android app in.Net maui? I have been trying to restart the application when the system reboot in .net maui app AndroidManifest.xml BootBroadcastReceiver.cs using global::Android.App; using…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,856 questions
asked 2023-09-25T15:57:33.59+00:00
San Sheva Santhanaraj 0 Reputation points
1 answer

How to get the data from start date to end date

How can I find data from database between two dates. Problem-1. How can I find the data from the database between the two dates if I consider the parameters. Problem-1. If I use date as parameter then my datatable doesn't show data. Problem-2. I want to…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,560 questions
asked 2023-09-24T17:33:46.7466667+00:00
jewel 461 Reputation points
commented 2023-09-25T15:33:06.1566667+00:00
jewel 461 Reputation points
0 answers

MAUI: The content page and pop up pages are breaking in normal running

I am facing a weird issue in my new MAUI project. When LIVE running in visual studio all of my pages are working fine. But when I open the app normally, the app is breaking on some of the pages, but no issue in LIVE running. The same pages are working…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,856 questions
asked 2023-09-25T15:29:08.9033333+00:00
Sakshi Poojary 20 Reputation points
0 answers

MAUI: How to add splash screen in android platform

I am trying to add splash screen on my new MAUI application. I tried the implementation on this blog but the image is in circle (Android 12 device) and only showing black and white color on the icon. Is there anyway to show the real color of the icon on…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,856 questions
asked 2023-09-25T15:20:10.3266667+00:00
Sakshi Poojary 20 Reputation points
edited the question 2023-09-25T15:27:57.95+00:00
Sakshi Poojary 20 Reputation points
0 answers

Getting issue with creating the iOS build for iOS 17

Hi, My Config details are On windows Machine Visual Studio 2022 Xamarin Forms 4.6 Xamarin.iOS 16.4 On Mac Machine Xcode 15 Now I have connected my mac machine from Windows machine and can run the my project (iOS build) successfully and…

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,150 questions
asked 2023-09-25T15:24:53.88+00:00
Santosh Kundkar 0 Reputation points
0 answers

MAUI: Dependency injection is not working

I have a dependency injection in my project for getting the device unique id. It is working fine in my xamarin forms project, but when I add it on my MAUI project the result is blank. My code IDevice public interface IDevice { string…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,856 questions
asked 2023-09-25T15:21:44.31+00:00
Sreejith Sreenivasan 351 Reputation points
0 answers

Empty space occurs in secondary toolbar item MAUI

Here is my toolbar item In secondary toolbar item, empty space occurs before first element. <Shell.ToolbarItems> <ToolbarItem IconImageSource="fontsize" Order="Primary"/> <ToolbarItem…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,856 questions
asked 2023-09-25T15:16:08.6066667+00:00
Gnana 0 Reputation points
2 answers One of the answers was accepted by the question author.

Changing color of 3 dots in Toolbar .net Maui

In my project I have secondary toolbar items. For every other item in the toolbar I have a white design. How can I change the color if the 3 dots in my toolbar. I specified the Toolbaritems in .xaml file. <ContentPage.ToolbarItems>…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,856 questions
asked 2022-09-23T10:16:49.05+00:00
Dustin 41 Reputation points
answered 2023-09-25T15:06:52.7+00:00
Gnana 0 Reputation points
1 answer

How to get user name for Blazor server applications (EasyAuth)?

I configured azure app service using EasyAuth. I tried to get the user name in the article below, but the username was returned null. The EasyAuth is working…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,560 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,105 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
5,618 questions
asked 2023-09-21T06:31:02.0733333+00:00
takeolexus 60 Reputation points
answered 2023-09-25T14:42:05.67+00:00
JasonPan - MSFT 2,456 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

How to clear webview cache in .net maui?

Let me know how to clear the webview cache

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,856 questions
asked 2023-07-27T05:19:52.8266667+00:00
Sowndarrajan Vijayaragavan 250 Reputation points
commented 2023-09-25T14:10:58.3166667+00:00
Ricardo Beck 1 Reputation point
2 answers

How to create HTTP Error Handling for the PUT method?

Hi, I would like to know how create HTTP Error Handling for the PUT method and rendering the information to user in UI. I guess that it's also possible to make GLobal HTTP Error Handling for all methods! I've created the put method which, when two users…

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,105 questions
asked 2023-09-20T15:57:55.88+00:00
sblb 1,141 Reputation points
edited a comment 2023-09-25T14:05:08.6833333+00:00
sblb 1,141 Reputation points
2 answers

VS 2022 .net6 core C#. Application.StartupPath is different at run time.

Hi, I am trying to capture my project home directory: string exeFolder = Application.StartupPath; While i test app i am getting path with MyPath"bin\Debug\net6.0-windows". in result i cannot access my report folder with reports. Is there a…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,560 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.
8,969 questions
asked 2023-09-23T00:46:59.4233333+00:00
Ed Januskis 46 Reputation points
commented 2023-09-25T13:52:57.8966667+00:00
Ed Januskis 46 Reputation points
0 answers

How to Deploy .Net Maui Windows application in Intune using Line of Business Deployement?

I have a .NET Maui Application and I published it into Side Loading package. In the created package there is one main .msix file and another Microsoft.WindowsAppRuntime.1.2.msix inside a dependency folder. I am using Intune Line of Business deployment to…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,856 questions
Microsoft Intune
Microsoft Intune
A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.
3,306 questions
asked 2023-09-25T13:28:14.65+00:00
Lohith K K 60 Reputation points
0 answers

Make Customize splash screen

Can anyone make like this below fully customize splash screen that also runs for android 12 and later versions also? with background images as well

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,856 questions
asked 2023-09-25T13:15:33.3666667+00:00
Haider Ali Faizi 40 Reputation points
1 answer One of the answers was accepted by the question author.

ASP.NET CORE <> JWT

Capturepostman.JPG Capturebearer.JPG I added JWT Authentication using The Auth Controller C:\Users\allam\source\repos\VisitsApi\VisitsApi\Controllers\AuthController.cs Returns a Token . The call to https://localhost:7070/api/Visits fails even I pass…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
3,560 questions
asked 2023-09-25T07:01:43.4466667+00:00
Dotnet Engineer 260 Reputation points
accepted 2023-09-25T13:14:04.7133333+00:00
Dotnet Engineer 260 Reputation points
1 answer One of the answers was accepted by the question author.

How to Reduce Splash screen time in .net maui?

I am working on .net maui apps and I want to set fully custom splash screen using page like doing in modern apps (due to android 12 or later limitations). So, I make one page that shows immediately after splash screen that is actually my splash screen.…

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,150 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
1,856 questions
asked 2023-09-24T08:51:12.0666667+00:00
Haider Ali Faizi 40 Reputation points
accepted 2023-09-25T13:11:45.9066667+00:00
Haider Ali Faizi 40 Reputation points