Questions




Answers
2
How to check if I am using localhost server or not in C# MVC?

I am trying to create a background job using hangfire as explained in this article "Background jobs in ASP.NET MVC C# using Hangfire.io" but I don't want to run this background jobs when working locally.

So, How can I check if I am on localhost in C# & ASP.NET MVC and not run this background jobs?

...
Read More
Answers
2
How to make a div editable on Click?

I would like to make div editable to enter contents in it and on changing content, want to call ajax to save data in back-end.

I know we can do it using Textbox, but would like to make a <div> inside <td> to make it editable when user clicks inside it.

...
Read More
Answers
0
How to update table variable in stored procedure from another user defined function in sql?

Scenario : User defined function return one table. If that table contains at least one row,one column in the table variable from another sp should get updated.

Should I use cross join on UDF to update table variable?

sql

...
Read More
Answers
1
How can I run raw SQL query in C#? ( With and Without ADO.NET)

I am trying to optimise my query to get data from database, so I would to know how can I directly run a sql query in my C#.

Currently I am using Entity framework with EDMX, so to improve query time, I would like to know how can I run direct sql query?

...
Read More
Answers
1
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
Answers
1
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
Answers
2
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
Answers
3
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
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
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

Page 12 of 54