Category "c++sharp"

Automapper:Converting JSON to list of objects

Source Object (JSON, using JSON.NET if it matters): { "conum" : 1001, "name" : "CLN Industries Corporation", "agencyName" : "Murphy, Holmes & A

How to cancel .Net Core Web API request using Angular?

I have the following two applications Angular 6/7 App .Net Core Web API I am making GET request to API using Angular's HttpClient as shown below this.subscrip

How to create and install test adapter in Visual Studio

I want' to create a protractor test adapter for Visual Studio. I have found I can create it with implementing ITestExecutor and ITestDiscoverer. I follow the Ma

How to change Text of button in FileUpload control and set value to textbox

Hi I want to upload file using c# but want to display as below image. I want to change the text of button from default “Browse” to “Upload&

How to retrieve list item attachments with SharePoint 2013 Event Receiver in correct order

I've created a Standard SharePoint 2013 Event Receiver on a custom list. Watched Event = "ItemAdded". Later in my code I need to retrieve the attachments of t

Splice IEnumerable with Linq

Is there an in-built way to splice an IEnumerable in Linq-To-Objects? Something like: List<string> options = new List<string>(); // Array of 20 st

Create HTML table from a list

I am trying to get some values from a List and then create a html table with this data but I can't get it to work properly. I have: HtmlTable table = new HtmlTa

Procedure or function expects parameter which was not supplied, when parameter is auto-generated

I'm trying to insert data in my db. this is the code im using SqlCommand cmd = new SqlCommand("dbo.UsersInsert", cnn); cmd.CommandType = CommandType.StoredPro

How to send info to site about desktop resolution in Selenium?

I am developing an application and I need to send some info about the resolution of a browser's window and the resolution of a monitor. The resolution is curre

Using 'UseMvc' to configure MVC is not supported while using Endpoint Routing

I had an Asp.Net core 2.2 project. Recently, I changed the version from .net core 2.2 to .net core 3.0 Preview 8. After this change I see this warning message

Is there any way to remove bindings from all bound elements on a form close event?

According to this document, the following code causes a memory leak in WPF: myDataBinding = new Binding("Children.Count"); myDataBinding.Source = myGrid; myDat

How to find a keyword in a visual studio project

I am looking at an old project one of my colleagues wrote in AngularJS in Visual Studio and as we all know, it's pretty difficult to understand code when you're

ServiceStack HasPermission in the context of the request

I am trying to harness the authentication and authorisation features of servicestack so that I don't need to pollute my service code with this, which should lea

How to do a background for a label will be without color?

I want to add a label to my form , and I want it without any color- I want just it's text to be visible, I don't find this option in the label's properties, can

Drawing getbounds rectangle or rectangleF?

I have a List with float coordinates and I'm trying to draw a rectangle around a line previously drawn. Graphics G = e.Graphics; Pen pen5 = new Pen(Color.D

System.ArgumentNullException: 'String reference not set to an instance of a String. Parameter name: s'

When i submit the registration form i get this error: System.ArgumentNullException: 'String reference not set to an instance of a String. Parameter name:

My SelectList based on an enum cannot update the database

I have a simple Html.DropDownList that is backed by a SelectList which, in turn, is backed by my enum. Enum Colors Red=1, Green, Blue I add an option label to

How to use jquery in ASP.​NET Core

I created a ASP.NET core template and wrote a jquery script. When I look at the page I see that jquery is loaded into the page, but the script doesn’t run

Using strings instead of enums?

Is it common place to use a string for comparison as opposed to an enum?

ServiceStack HasPermission in the context of the request

I am trying to harness the authentication and authorisation features of servicestack so that I don't need to pollute my service code with this, which should lea