I have the specified start date time and end date time i.e (end date time is end of sequence), I add a time interval (this can vary) to the start date time in minutes and this gives me the end date time. we can set time interval 15minutes (60 sec*15 min=900sec).
We need to add [ValidateAntiForgeryToken] attribute before our action. And also should add @Html.AntiForgeryToken() in our form.
Here I am using CTE(Common Table Expression) for Delete duplicate rows. PARTITION BY : It devides the query result into partitions Row_NUMBER : gives unique name for all duplicate rows ie., if one row record repeated for 3 times . it gives the index such as 1,2 and 3 Using this query we can delete all duplicate rows in a table
Simple example of how to create a drop down list in ASP.NET MVC using DropDownListFor.
If it's not a nullable column, you have to insert some value to existing table in SQL server.
The goto statement is a jump statement that controls the execution of the program to another segment of the same program.
We need to repeat the code block of C# statements as long as a certain Boolean expression evaluates to true.
Foreach Loop In C# is used to access or iterate each item in a collection. We use foreach, on a string array, to loop through the elements in the array.
For loop that needs to execute a specific number of times until a specified expression evaluates to false.
If we want to Remove last character from string using c#. If we want to remove the last char of my string whatever it is. So we want if my string is "12342" became "1234".