10,405 questions with C#-related tags

Sort by: Updated
0 answers

Why is my GUI app breaking when running.

I have a GUI app which should load the designer content, but fails and goes to break state. It seems there is a problem loading a DLL file, but another version (on another machine) is running OK. Version is visual studio community 2022 64bit 17.10.0.…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,712 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.
10,405 questions
asked 2024-05-29T10:55:04.66+00:00
Per Jensen 0 Reputation points
1 answer

How to insert new,update, delete existing record in single row of gridview

I am developing ASP.NET application and i am using gridview in that. Here, i am not using any textbox controls outside of the gridview to save the record. everything i want to maintain in same row of the records. for example, when page load, if any…

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,320 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.
10,405 questions
asked 2024-05-28T14:36:20.12+00:00
Gani_tpt 1,786 Reputation points
commented 2024-05-29T09:28:44.78+00:00
Gani_tpt 1,786 Reputation points
1 answer

Rename mdb table

Hello I use Access Database Engine and OleDbReader to work with mdb and accdb files, need to rename a table: ALTER TABLE <table name> RENAME TO <new table name> OleDbException, anyway using ADE? Thanks

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.
10,405 questions
VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,610 questions
asked 2024-05-29T04:01:30.4533333+00:00
StewartBW 545 Reputation points
edited an answer 2024-05-29T08:36:47.01+00:00
Jiachen Li-MSFT 27,241 Reputation points Microsoft Vendor
0 answers

c# failed to invoke the openai API interface on Azure

I am using the official example to access the openai interface times the following error, how can I solve, increase the number of repetition is still the same public class OpenaiApi { public async Task<string> OpenaiAPI(string selectedText,…

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.
10,405 questions
Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
2,312 questions
asked 2024-05-29T08:10:41.67+00:00
Xianpeng XP3 Huang 0 Reputation points
1 answer One of the answers was accepted by the question author.

How to make fit ASP.NET page in horizontal bar when resizing the width of the page manually

I am developing ASP.NET application. sometimes user, resizing the width of the page. most of the global page (like microsoft all the pages), the page automatically fit the width based on the size of the horizontal width. How to make this. by default, the…

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,320 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.
10,405 questions
asked 2024-05-25T07:53:00.6633333+00:00
Gani_tpt 1,786 Reputation points
commented 2024-05-29T07:32:21.86+00:00
Gani_tpt 1,786 Reputation points
0 answers

How to fix build errors that I am getting currently when I convert my .NET MAUI [ sdk 6 version] to .NET 8 version?

I am currently in a process of converting my MAUI project which is in .NET 6 version to .NET 8 version. I have used Microsoft's .NET upgrade assistant extension tool for the same. After successful upgrade, when I try to build/rebuild my project, I am…

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,469 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
2,995 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.
10,405 questions
asked 2024-05-29T07:24:16.99+00:00
Suhas MR 0 Reputation points
0 answers

How to reproduce the UI control from mock-up using wpf?

Hi Team I have a mock-up and want to reproduce it using wpf controls given by Microsoft forms in windows. Below is my current code and need some adjustment, as well screen shot of the mock-up want to produce using wpf ui controls. <UserControl…

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,689 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.
10,405 questions
asked 2024-05-28T16:45:17.65+00:00
Gcobani Mkontwana 40 Reputation points
commented 2024-05-29T07:17:17.3466667+00:00
Hongrui Yu-MSFT 415 Reputation points Microsoft Vendor
1 answer

How to obtain an access token for On-premises SharePoint

I have a SharePoint clientId and clientSecret. Is it possible to obtain an access token for On-premises SharePoint through a Windows service? what should be the API end point to get the access token?

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,891 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.
10,405 questions
asked 2024-05-28T12:03:30.0066667+00:00
Shankar, Bhukya 0 Reputation points
answered 2024-05-29T07:15:58.5566667+00:00
RaytheonXie_MSFT 32,246 Reputation points Microsoft Vendor
2 answers

REST interface, server for GET,PUT,POST,DELETE

Hello, My goal is to control a Rest Server from a WPF C# desktop app. Get, Push, Pop, Delete should be tested. The server does not require extensive logic, only test data. Later, the customer REST server is connected. How can I achieve this? How should I…

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,247 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,320 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.
10,405 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.
306 questions
asked 2024-05-23T17:15:44.0466667+00:00
Noah Aas 260 Reputation points
commented 2024-05-29T06:31:46.8066667+00:00
Tiny Wang-MSFT 1,841 Reputation points Microsoft Vendor
1 answer

How to customise global window closing prompt in a .NET MAUI application

I am working on a .NET MAUI project for desktop, I found a global solution for prompting a user before closing the application here. I would like to know if this can be customised and triggered conditionally when closing. For example: I have an…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
2,995 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.
10,405 questions
asked 2024-05-28T08:55:28.29+00:00
Arturs Pramalts 0 Reputation points
answered 2024-05-29T06:26:55.6+00:00
Leon Lu (Shanghai Wicresoft Co,.Ltd.) 69,616 Reputation points Microsoft Vendor
0 answers

How to upload a analyzed document done with documentAnalysisClient.AnalyzeDocumentAsync call in code, into the training dataset in code, which mimics the 'Mark as to uploaded into the training dataset' button in Azure DI

After analyzing a doc with the documentAnalysisClient.AnalyzeDocumentAsync, I need a way to upload the tested doc directly into the training dataset of its corresponding blob with the already labeled fields. Basically I need to mimic the yellow…

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.
10,405 questions
asked 2024-05-23T09:34:07.56+00:00
edited the question 2024-05-29T05:44:38.68+00:00
romungi-MSFT 42,796 Reputation points Microsoft Employee
1 answer

Moving xamarin.ios to new SKD style issues

I am trying to move my xamarin.ios project to the new SDK style as MS is no longer supporting the previous methods. I am following the steps at https://learn.microsoft.com/en-us/dotnet/maui/migration/?view=net-maui-8.0 But I get multiple…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
2,995 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.
10,405 questions
asked 2024-04-15T17:54:17.71+00:00
Phunction 206 Reputation points
commented 2024-05-29T05:29:43.16+00:00
Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 27,126 Reputation points Microsoft Vendor
4 answers

How to connect my c# application to my phpmyadmin database from my NAS?

Good day, I want to try to connect to my database in my NAS. Please take a look the image below. As you can see at the image, I want to access my database outside in my home network. I already installed phpmyadmin in my NAS, but the problem is I don't…

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.
10,405 questions
asked 2024-05-26T11:07:34.2566667+00:00
BgnerNprg207 226 Reputation points
edited the question 2024-05-29T05:25:00.1366667+00:00
Jiale Xue - MSFT 37,136 Reputation points Microsoft Vendor
1 answer

How to create event for subclassed control

I use GestureRecognizers with Label in lots of places in an app and would like to create a new Label control that basically uses Label as the base and adds a TapGestureRecognizer that invokes an event that can be defined in XAML. I know how to subclass…

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
2,995 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.
10,405 questions
asked 2024-05-28T15:05:06.46+00:00
Lloyd Sheen 1,391 Reputation points
answered 2024-05-29T05:10:46.8066667+00:00
Leon Lu (Shanghai Wicresoft Co,.Ltd.) 69,616 Reputation points Microsoft Vendor
0 answers

Azure Function app timeout in 4 minutes (230 seconds)

I am getting 500 Timeout issue while running function app for more than 4 minutes (230 seconds). It was working for 30 minutes when we were using .net 6 version. Suddenly we started getting 500 timeout when we updated function app to .net 8 version.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,398 questions
Azure Load Balancer
Azure Load Balancer
An Azure service that delivers high availability and network performance to applications.
412 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.
10,405 questions
asked 2024-05-29T03:08:44.4366667+00:00
Shirvadkar, Virendra 0 Reputation points
commented 2024-05-29T04:36:45.53+00:00
SwathiDhanwada-MSFT 18,031 Reputation points
0 answers

Using User Control in WPF, How to create good UI grid?

Hi Team I have a mock-up and want to reproduce it exactly the same way using User controls offered by Microsoft forms in WPF. <UserControl x:Class="Feedmill_Weighbridge.Presentation.UCPremixPacks" …

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,689 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.
10,405 questions
asked 2024-05-28T17:20:47.55+00:00
Gcobani Mkontwana 40 Reputation points
commented 2024-05-29T03:52:26.58+00:00
Hongrui Yu-MSFT 415 Reputation points Microsoft Vendor
1 answer

How to pars the text and extract some parts and assigning them to variables in visual studio .Net without interfering with the received data from serial port?

I have a received data from com port in this format: ************************* General Device Configuration ************************* Flash address...............0x40100180 Memory allocated............256 Size on…

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,712 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.
10,405 questions
asked 2024-05-28T15:45:37.88+00:00
Goharshenasanesfahani, Sahar 0 Reputation points
answered 2024-05-29T03:14:57.0033333+00:00
Jiale Xue - MSFT 37,136 Reputation points Microsoft Vendor
0 answers

Object cannot be cast from DBNull to other types.

Good day, I want to check my DB connection and here's my code. private void Button2_Click(object sender, EventArgs e) { string mysqlcon =…

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.
10,405 questions
asked 2024-05-28T11:44:27.7833333+00:00
BgnerNprg207 226 Reputation points
edited the question 2024-05-29T01:22:33.28+00:00
Anna Xiu-MSFT 26,651 Reputation points Microsoft Vendor
2 answers

How to build screen recorder Winform GUI app which also records the sound of system at the same time

using System; using System.Diagnostics; using System.Drawing; using System.Windows.Forms; using NAudio.Wave; using SharpAvi; using SharpAvi.Codecs; using SharpAvi.Output; namespace ScreenAudioRecorder { public partial class Form1 : Form { …

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.
10,405 questions
asked 2024-05-27T15:21:50.9433333+00:00
Rahmatulloh 0 Reputation points
edited a comment 2024-05-28T21:03:45.3633333+00:00
KOZ6.0 5,375 Reputation points
1 answer

My listview is listing only the id instead of 3 items on the table

PLEASE HELP ME I am working on sqlite database , i have the following code in c# maui return (await conn.Table<ServiceData>().ToListAsync()) ```.Where(s…

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
704 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
2,995 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.
10,405 questions
SQL Server Training
SQL Server Training
SQL Server: A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.Training: Instruction to develop new skills.
4 questions
asked 2024-05-28T15:40:05.35+00:00
Gbenga Banuso Odumosu 40 Reputation points
answered 2024-05-28T20:33:37.04+00:00
hossein jalilian 4,285 Reputation points