Microsoft Q&A

.NET

12,981 questions

Microsoft Technologies based on the .NET software framework.

Browse all .NET tags

12,981 questions with .NET-related tags

Sort by: Updated
1 answer

Upload a File One drive using MS Graph API in C#

when I am Uploading a File using Onedrive MS graph API in C# the file get Uploaded but every time i got a mail to that one drive account. I have set all notifications off from the one drive settings but still i am getting an email on every time file…

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,194 questions
Microsoft Graph Files API
Microsoft Graph Files API
A Microsoft API to create an app that connects with files across OneDrive, OneDrive for Business, and SharePoint document libraries.
306 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
583 questions
asked 2023-01-26T18:56:59.4+00:00
Pradyut Sinha 16 Reputation points
answered 2023-02-03T05:50:46.26+00:00
SrinivasaRaoDarna - MSFT 6,156 Reputation points Microsoft Employee
1 answer

'UILocalNotification' is obsoleted on: 'ios' 10.0 and later (Use 'UserNotifications.UNNotificationRequest' instead.)

I want to receive and display push notifications on my iPhone/iPad but I get the following message in Visual Studio for Mac: 'UILocalNotification' is obsoleted on: 'ios' 10.0 and later (Use 'UserNotifications.UNNotificationRequest' instead.) I use .NET…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
902 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.
6,981 questions
asked 2023-01-30T12:24:14.4933333+00:00
Kim Strasser 361 Reputation points
edited a comment 2023-02-03T05:49:55.5033333+00:00
Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 15,741 Reputation points Microsoft Employee
0 answers

How to program the OnBackButtonPressed Xamarin

Hello I implented the the Mediapicker in my xamarin page, but if I am in the menu for "Picking up Photo" I try to click on Back Button to turn back to the previous Mainpage but it doesnt work because the BackButton is not defined. Please…

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
4,813 questions
asked 2023-02-02T11:14:10.31+00:00
Wanderer in der tiefen Nacht 0 Reputation points
commented 2023-02-03T05:40:16.58+00:00
Leon Lu (Shanghai Wicresoft Co,.Ltd.) 41,496 Reputation points Microsoft Employee
1 answer One of the answers was accepted by the question author.

How to protect .apk file generated from Visual studio from tampering ?

We have developed the app using Xamarin Android native. While decompiling the apk we can see the manifest file is accessible and able to add debug options.How to protect it ?

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
4,813 questions
asked 2023-02-02T08:51:13.74+00:00
V, Kavyasri 21 Reputation points
commented 2023-02-03T05:18:51.1666667+00:00
Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 11,296 Reputation points Microsoft Employee
1 answer One of the answers was accepted by the question author.

Linq query and violation of inserting null in database

Hello All, I have the following two model classes: public partial class EmployeeInfo { public int EmployeeInfoId { get; set; } public string LastName { get; set; } = null!; [DisplayName("First Name")] public string FirstName { get; set; } =…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,565 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.
6,981 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
600 questions
asked 2023-01-31T01:42:14.5866667+00:00
Anjali Agarwal 101 Reputation points
accepted 2023-02-03T04:58:37.07+00:00
Anjali Agarwal 101 Reputation points
0 answers

embedding a pdf file in my chrome browser

I am trying to embed a pdf file on my web page. In order to achieve this, I have the following code in my controller: public IActionResult Index() { string path = Path.Combine(_environment.WebRootPath, "packageFiles"); …

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,565 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
600 questions
asked 2023-02-03T04:57:40.42+00:00
Anjali Agarwal 101 Reputation points
1 answer

How to format razor pages in blazor in visual studio 2022

Hi, we are having problems with formatting after upgrade to visual studio 2022. In visual studio 2019 we could format our razor files pretty well, in visual studio it looks really bad. We cannot use 2019 anymore because of the .net 7.

Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
790 questions
asked 2023-02-02T09:09:50.9866667+00:00
Ante Gavranovic 0 Reputation points
edited an answer 2023-02-03T04:55:18.8766667+00:00
Zhi Lv - MSFT 18,796 Reputation points Microsoft Employee
0 answers

IEnum object True for All

Hi friends, I wonder if there is a way to use TrueForAll for IEnumerable<OrderDetail>? I am trying to check if all of the status = 1 or not. How can I check if all statuses in details are 1 or not? Thank you. var details =…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,565 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.
6,981 questions
asked 2023-02-03T04:39:43.0233333+00:00
Cenk 666 Reputation points
edited the question 2023-02-03T04:48:32.0533333+00:00
Cenk 666 Reputation points
1 answer One of the answers was accepted by the question author.

Is there a Event handler available on .Net / c++ /c# for Wireless profile added event and deleted event?

I want to register a Windows app for listening to Wireless profile changes (Addition or Deletion) performed on Windows settings or by executing netsh commands from CMD. Is there any event handler available for the same? If yes, how to register for the…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
902 questions
Windows App SDK
Windows App SDK
A set of Microsoft open-source libraries, frameworks, components, and tools to be used in apps to access Windows platform functionality on many versions of Windows. Previously known as Project Reunion.
437 questions
Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
1,897 questions
.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: The period of time during which a program is being executed in a computer.
956 questions
.NET Internet of things
.NET Internet of things
.NET: Microsoft Technologies based on the .NET software framework.Internet of things:
22 questions
asked 2023-02-01T15:48:01.6966667+00:00
Shivanand Rao A V 0 Reputation points
commented 2023-02-03T04:14:04.5166667+00:00
Shivanand Rao A V 0 Reputation points
2 answers

records update using visual basic and UPDATE SET statement ACCESS table

Hello There I am trying to update ACCESS table records using the statement UPDATE SET WHERE and a datagridview as source, the code that I put together seems to be running fine (syntax talking), I say syntax because there is not error or break during…

VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
1,830 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
614 questions
asked 2023-01-15T21:31:17.18+00:00
salvatore Colaiuda 0 Reputation points
answered 2023-02-03T03:58:10.0566667+00:00
salvatore Colaiuda 0 Reputation points
1 answer

Hide\Show group text in ASP.NET

Hi, I want to show & Hide group box according to certain condition: ASP.net: <div id="MyDiv" runat="server" visible="true" style="margin-top: 10px; margin-bottom: 10px;"> <asp:Panel…

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,194 questions
asked 2023-02-02T12:08:21.46+00:00
Bill Johnson 1 Reputation point
commented 2023-02-03T03:20:11.24+00:00
Lan Huang-MSFT 9,201 Reputation points Microsoft Employee
0 answers

Parallax Background in web page - Setting div element background to transparent does not work for me

I don't know if I'm having a senior moment or not... I'm trynig to implement a parallax scrolling type of display in a web page. I have sourced the sample code from W3 Schools and adapted it, by adjusting margins basically (Please see -…

ASP.NET Web Forms
ASP.NET Web Forms
A part of the ASP.NET web application framework that can be used to create ASP.NET web applications.
405 questions
asked 2023-02-03T02:55:59.9233333+00:00
Zahir Khan 0 Reputation points
edited the question 2023-02-03T03:07:08.96+00:00
Zahir Khan 0 Reputation points
0 answers

How to configure Azure App Service so that the cache-busting rewrite rules in our Web Forms app's web.config work?

In our ASP.NET 4.8 Web Forms app web.config file we have following rewrite rule under the <system.webServer> section in order to cache bust certain CSS and JS files: <rewrite> <rules> <rule…

ASP.NET Web Forms
ASP.NET Web Forms
A part of the ASP.NET web application framework that can be used to create ASP.NET web applications.
405 questions
Azure Web Apps
Azure Web Apps
A feature of Azure App Service used to create and deploy scalable, mission-critical web apps.
4,322 questions
asked 2023-02-01T18:46:02.03+00:00
Jan J. Vopalensky 0 Reputation points
commented 2023-02-03T03:03:08.0666667+00:00
Jan J. Vopalensky 0 Reputation points
1 answer

Help with CommunityToolkit.MVVM

Hi, I am trying to use the CommunityToolkit.MVVM but when setting the two values in my sample vcard and color it's not getting Binded later on. the Popup as you can clearly see in the sample. https://www.softnames.com/temp/MVVMApp.zip Kindly…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
902 questions
asked 2023-02-02T22:53:31.4766667+00:00
Jassim Al Rahma 1,086 Reputation points
answered 2023-02-03T02:59:33.0466667+00:00
Leon Lu (Shanghai Wicresoft Co,.Ltd.) 41,496 Reputation points Microsoft Employee
0 answers

how to use blazor webassembly in razor pages?

how to use blazor webassembly component in razor pages? if I create Count in webassembly how to use it in razor pages? if I do not open that page do not load dll If I open that page then load it. /Pages/Count.cshtml with component Count If I do not open…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
2,565 questions
ASP.NET Web Forms
ASP.NET Web Forms
A part of the ASP.NET web application framework that can be used to create ASP.NET web applications.
405 questions
ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
600 questions
asked 2023-02-03T02:56:39.31+00:00
打玻璃 1,526 Reputation points
1 answer

Insecure Storage: Android World Readable or Writeable issue

We are reports from static scanning engines of "Insecure Storage: Android World Readable or Writeable" issues for our Xamarin mobile apps. The specific paths highlighted are: /data/data/[app name]/files/.config /data/data/[app…

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
4,813 questions
asked 2023-02-02T14:19:25.06+00:00
Kavanagh, John 0 Reputation points
answered 2023-02-03T02:50:17.5366667+00:00
Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 11,296 Reputation points Microsoft Employee
1 answer One of the answers was accepted by the question author.

Loop through Controls in ScrollView and Get the Data

Hi, In below XAML: <ScrollView x:Name="ScrollViewDetails" Grid.Row="1"> <VerticalStackLayout> <VerticalStackLayout x:Name="StackLayoutPhones"> <BindableLayout.ItemTemplate> …

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
902 questions
asked 2023-01-20T21:11:41.77+00:00
Jassim Al Rahma 1,086 Reputation points
commented 2023-02-03T02:38:43.87+00:00
Leon Lu (Shanghai Wicresoft Co,.Ltd.) 41,496 Reputation points Microsoft Employee
3 answers

Database design suggestion

Hi there, I have an ASP.NET web API application and am trying to upgrade it to Core. I am using EF 6, code first. I have this entity but the requirements changed. Now I have more than one price and currency for a product. How can I design the…

Entity Framework 6.0
Entity Framework 6.0
A Microsoft open-source object-database mapper for .NET.
218 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.
8,540 questions
ASP.NET API
ASP.NET API
ASP.NET: A set of technologies in the .NET Framework for building web applications and XML web services.API: A software intermediary that allows two applications to interact with each other.
147 questions
asked 2022-11-20T17:32:34.617+00:00
Cenk 666 Reputation points
answered 2023-02-03T02:35:47.5466667+00:00
Louis Davidson 21 Reputation points Microsoft MVP
1 answer One of the answers was accepted by the question author.

Address Autocomplete

Hello everyone and thanks for the help in advance. I need to develop a page for address input that will be entered by an end user. Obviously, user input is prone to error so I am looking for solutions to validate the input. I know the US Postal…

ASP.NET MVC
ASP.NET MVC
A Microsoft web application framework that implements the model-view-controller (MVC) design pattern.
600 questions
asked 2023-02-02T02:18:07.7633333+00:00
Kmcnet 201 Reputation points
accepted 2023-02-03T02:32:59.3666667+00:00
Kmcnet 201 Reputation points
1 answer

How create a Xamarin Android distro than can be sideloaded?

I have done this before. I believe in Android Porject->Properties->Archive I used to be able to create an APK that could then be sideloaded from a shared Windows server onto an Android device. I am now on VS 2022 and it seems the only Archive…

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
4,813 questions
asked 2023-02-01T17:24:30.1866667+00:00
Charles Mills 26 Reputation points
edited a comment 2023-02-03T02:31:03.3833333+00:00
Leon Lu (Shanghai Wicresoft Co,.Ltd.) 41,496 Reputation points Microsoft Employee