2128 1
how to implement switch case in Razor (.cshtml)?

I need to implement switch case in Razor C# page as if-else would not be a good idea, because it will create too many conditions, so i thought to create Switch case instead, here is my current code, but it throwing syntax error

...
Type
Question
razor C# razor syntax select case switch in mvc view switch case in razor
2106 3
Using Entity framework join (EF join) to join two or more tables
In this article, I will explain how we can easily implement inner join on data of two or more tables using entity framework join (ef join) in ASP.NET MVC C#.
Type
Article
C# Entity framework join ef join join using lambda linq to sql join join in entity framework
2086 2
How to convert JSON String into C# class object

I am trying to convert JSON object into C# class object, Using a really simple test case:

...
Type
Question
JSON C# serialization deserialization
2012 0
Ways to convert List into Datatable using C#
This article gives you quick solution & few ways to convert .ToList() or IEmuerable List data into DataTable using C#.
Type
Article
C# convert List into Datatable convert generic list to datatable c# using linq LINQ: IEnumerable to DataTable
1927 1
Error : An asynchronous operation cannot be started at this time

When I am trying to call async method in Class from controller, I am getting the error as below

An asynchronous operation cannot be started at this time. Asynchronous operations may only be started within an asynchronous handler or module or during certain events in the Page lifecycle. If this exception occurred while executing a Page, ensure that the Page is marked <%@ Page Async="true" %>

How can I resolve this error, here is my Current code

...
Type
Question
C# async await asp.net mvc

1899 1
How to validate TinyMCE textarea in ASP.NET MVC?

How can i validate TinyMCE using asp.net MVC and razor? Currently, i was trying to validate it using Model validations but it is not working and not showing any errors even when TinyMCE textarea is blank, so how can i validate it? here is my javascript code

...
Type
Question
MVC tinyMCE-validate-in-razor validation razor
1885 0
Sealed Class in C# (Explanation with example)
This Article provides you complete information with working example of sealed class and methods in C# and how it can be useful for you.
Type
Article
C# Sealed class in C# sealed class use
1857 2
How to encrypt and decrypt a string in C#? Need easy method with example

How to encrypt and decrypt a string in C#? I would like to know simplest and efficient way for this using some example if possible, thanks

...
Type
Question
C# encrypt decrypt string
1856 0
How to convert string to int in C#?
In this article, I will provide you quick and easy ways to convert string to int using int.parse and int.tryparse with explaining the difference between these two.
Type
Article
C# convert string to int int.Parse and int.TryParse
1848 0
Read excel file in C# (Console application example using OLEDB)
In this article, I am going to provide you code with explanation in C# to read excel file (xls) using OLEDB using Console application example.
Type
Article
C# c# read excel c# read excel file c# read excel file example c# open excel file c# read excel file line by line

Page 3 of 12