Category "c++sharp"

How to move the cursor in a DataGridView c#

How to move the cursor in a DataGridView? No. .Selected = true; as this puts the cell in blue by default! I want the cursor to move When I click on "Add" button

How to effectively change authentication method in ASP. NET web.config?

I am trying to launch ASP.NET project on a local computer. IIS responds with 401.0 status code, stating that "authenticated user does not have access to a resou

Web.config causing "blocked by group policy" error

The myriad of different web.config settings have always been a bit of a mystery to me. I'm glad Microsoft has cleaned up some of the content put there by defaul

Transparency for windows forms textbox

I'm using windows forms in C# and I need to make a textbox's background color transparent. I have a trackbar that goes from 0 to 255 that is supposed to control

Reading an .eml (outlook email) file using c#

I'm writing a service that cleans files by removing all malicious content. I'm using Interop Excel & Word api's like this: Excel var excelApp = new Mi

MS Word 2010 Could not open macro storage

I am creating Word Document Using Word Template Following is code Word.Document wordDoc = new Word.Document(); wordDoc = wordApp.Documents.Add(ref oTempl

Moq with Unity Container unit testing

below is an example of production code that I am trying to unit test. I am struggling to resolve a dependency to a concrete class that is being used. public My

Reading an .eml (outlook email) file using c#

I'm writing a service that cleans files by removing all malicious content. I'm using Interop Excel & Word api's like this: Excel var excelApp = new Mi

Interface Method with different type of arguments

I'm constructing a set of filter-classes which will all have the same method 'Applyfilter'. How should I define the interface which contains apply filter? The o

How to force %20 instead of + in System.Net.WebUtility.UrlEncode

I need to encode a URL in a class library assembly where I don't want to reference System.Web. The URL contains several spaces https://query.yahooapis.com/v1/p

special character in folder string here @

I have been searching intensively, but the returning results are not quite what I am trying to achieve. I want to access a remote folder on a server. The pain p

How do I post SQL data using submit button in asp.net c# razor

Thanks in advance. Can anyone please help me get this button working so I can display a row from the Northwind database 'only' when the button is clicked. I h

How can I catch an exception and send it as json message?

I wrote a code but for some reason it doesn't work...can you tell me what's wrong? I want the app not to stop when I get an exception, only to send that excepti

Why is not working EF Core retry on failure

I've configured my db context to retry on failure this way: optionsBuilder.UseSqlServer(connectionString, sqlServerOptionsAction: sqlOptions => {

What is the right way to prerender Blazor WebAssembly?

It almost works after the following steps: Install the hosted version of blazorwasm template app. dotnet new blazorwasm --hosted -o HostedWasm Copy _Hosted.cs

Self Hosted WCF REST service JSON POST Method Not Allowed

I have literally seen thousands of these "WCF" questions on the internet so far, but I am beginning to think that it is impossible. Please someone tell me I am

How to store a video file in exe file in c# and play it

I am working with winForms in c#. I want to access video file from resources without using any dialog box for load or select. That means I want directly store v

HiQPdf not finding the css

The website I have written requires a convert web page to PDF functionality. After looking at the options HiQPdf looked like the best option and did all that wa

how to set an array value in local.settings.json file in azure functions

When I try to insert an array as one of the Values in local.settings.json file: { "IsEncrypted": false, "Values": { "AzureWebJobsStorage": "", "Azu

Parameterizing a raw Oracle SQL query in Entity Framework

I'm trying to parameterize a raw SQL query for an Oracle synonym (non-entity) in EF 4 and I am having some problems. Currently I am doing something like the co