I am trying to does my vscode wont go as a tree view, if the parent folder has one file (either file or sub-folder), it always append to the main folder.
...
I am trying to run a below query in my ASP.NET MVC project, but I am getting an error "there is already an open datareader associated with this command which much be closed first" in C#, how can I resolve it?
Here is the C# code, which I am using
...I am trying to send email in ASP.NET MVC, but it is not a plain HTML string, I need to convert Razor View with Model into string and then send it as a HTML content in MVC. So, How can I convert Razor view in HTML string with Model and then send it in MVC email? Thanks
...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?
...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.
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
...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?
...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.
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#?
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?
...