Questions




Answers
0
How to make Group by in Linq work with possible null values, in C#?

I am trying to add List.GroupBy(a=>a.ProductType.Name).Select(a=>a.FirstOrDefault()), now here I can have null values for .ProductType or .name so how can I ignore null values in C#, so I can get proper results of GroupBy?

If I am using above query in C#, I am getting error

Object reference not set to an instance of an object

I tried to make it like List.GroupBy(a=>a.ProductType != null ? a.ProductType), but it doesn't work.

...
Read More
C# linq
Answers
0
How to create dynamic list type in C#?

Hello, I would like to create a helper function in the class, which can be used by multiple List types at the same, so how can I create initialize or create function to pass List<T> where T can be any type of class in C#?

...
Read More
C# dynamic list type
Answers
1
How to add custom search box in jQuery Datatable and place it outisde main Table?

I am using jQuery datatable in my ASP.NET MVC website, now I would like to place this custom search box main jQuery datatable, how can I do that using jQuery?

...
Read More
jQuery jQuery Datatable custom search
Answers
1
How to remove double quotes from string using C#?

I wanted to remove double quotes from a string using C#, How can I do that easily and efficiently?

For Example, I have string : "-10,20", how to get output -> -10,20

 

...
Read More
C# remove double quotes string
Answers
1
How can i display title or label on polygons on google map?

I want to display the title or label on loctions on the google map,it works on markers,but not within polygons.

Here is my current Google maps JS Code

...
Read More
Javascript C# jquery
Answers
1
Is it possible to call single usercontrol in Aspx page with multiple data and how?

i want to display multiple data in aspx page using single user control.data can be taken like dataset from database.

...
Read More
javascript jquery
Answers
1
Login to a website without using username and password

I want login to my project website without asking username and password  from a specified computer in javascript or. Net

 

...
Read More
Javascript Html Asp. Net
Answers
1
How to convert a positive number to negative number and negative to positive in C#?

Hello, I would like to know, How can I convert a positive number ( int type) to a negative number in C# and vice-versa ( negative to positive number using C#)?

 

 

...
Read More
C# positive-to-negative-int negative-to-positive-int
Answers
1
How to right-align button inside Flex div?

How can I right align a button which is index div using CSS flex?

I cannot use float:right or posoition:absolute/relative, so please let me know how can I do this using Flex in CSS.

...
Read More
CSS right-align-using-flex css-flex
Answers
1
How to show date time with am/pm using C# in ASP.NET?

I have datetime saved in the database as "2019-04-06 15:22:23.150" now, how can show this date time value to user with am/pm using C# or Razor syntax in MVC View?

Sample output : 09/04/2019 03:52 PM

Thanks

...
Read More
ASP.NET MVC C# datetime-format

Page 1 of 43