I want to export current date along with radgrid data to the excel sheet. How can I do this? For exporting radgrid I am using following code: public void Expo
I am using these lines of code to check if the record exists or not. SqlCommand check_User_Name = new SqlCommand("SELECT * FROM Table WHERE ([user] = '" + txtBo
Let's say I have two model classes: public class People { public string FirstName {get;set;} public string LastName {get;set;} } Also have a class Phone:
using System; using System.Collections.Generic; using System.Linq; using System.Text; using Facebook; using Newtonsoft.Json; namespace facebook { class Pro
I am trying to mock a sub-process for my tests. I know I can return the input to the function I am mocking as such: Mock<MockedObject> mock = new Mock<
Part of my code-behind: object _sync = new object(); private async void OnKeyDown(object sender, KeyEventArgs e) { if (!Monitor.TryEnter(_sync)) return;
I would like to display image inside a gridview. My gridview is being filled like This: Front: <asp:GridView ID="GridViewProduct" runat="se
I am accesssing the Outlook 2010 cache using the below code and modifying it. Please let me know how i can udpate the entry back to inbox mail store. Microsof
I have a string like this: string val = "123-12-1234"; How can I replace the dashes using an empty string in C#. I mean val.Replace(char oldChar, newChar);
How can i parse this json without class in c#. I don't know what to use either an array or anything else. This is the json result i want to be parsed { "s
After adding WindowsRuntime to a WinForms-project, building the project fails with Error "Must use PackageReference". The build log is more precise: C:[...]\Vi
I am currently developing an IVR system, my question is more on a development side of basic architecture and opening/closing a database connection. As you can
I'd like your opinion on the following subject: Imagine we have a method that is responsible of achieving one specific purpose, but to do so, it needs the supp
I've searched around and can't find an answer to my problem. I've got a View that takes accepts Foo in like so: @model IEnumerable<MyApplication.Models.Foo
As the title says I'm trying to obtain a vertical a bar and fill it depending on values. I couldn't apply any answers I found. One answer suggested replacing Sy
What disadvantages have an approach of sharing context by creating private static fields? If I don't need to call Dispose? public class MyTests3 : IDisposable {
So, I have Form called Preferences with TabControl in it. This TabControl contains several TabPages(General, Advanced, Misc, ...) with few comboboxes, checkboxe
json serializer settings for legacy asp.net core applications were set by adding AddMvc().AddJsonOptions(), but I don't use AddMvc() in asp.net core 3. So how c
I am building a sample razor component, and I can not get my button onclick method to fire. When I click the button nothing happens at all. I have even placed a
I have tried to build one gridview with dynamic columns based the data source using the template fields in asp.net through code behind. For that, to implement