4688 1
ViewBag data from controller is not visible in Partial View

I am passing Select List from ViewBag in controller to partial View, like I used to do , but it is not showing SelectList on partial View when code is pushed on server, while it works when running code locally, here is the code

Controller

...
Type
Question
4667 0
How to get month name from month number in C#?
In this short article, I have explained how you can get month name in C# easily in any format, using Datetime.
Type
Article
4623 2
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

...
Type
Question
4595 0
Implementing Google Authentication in ASP.NET MVC
In this article, I have explained step by step, how we can implement google oauth authentication using google api in ASP.NET MVC application.
Type
Article

4570 0
Model binding and Custom Model binding in MVC
In this article,first, I will explain about Model binding in ASP.NET MVC and then I will explain to create custom model binder in mvc C#.
Type
Article
4536 0
Solving error "the breakpoint will not currently be hit" in Visual studio ( Multiple ways)
In this article, I have provided multiple ways to resolve error "the breakpoint will not currently be hit, no symbols have been loaded for this document" in visual studio.
Type
Article
4500 1
How I connect chart.js to database in ASP.NET web form mvc in visual studio 2015 ?

 I have make a chart.js in my website to display chart showing demand of a fruit over date range using this script below :

 

<div class="chart-wrapper" style="height:200px;margin-top:40px;">
    <canvas id="main-chart" class="chart" height="100"></canvas>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.4.0/Chart.min.js">
</script>
<script>
    var ctx = document.getElementById("main-chart").getContext('2d');
    var myChart = new Chart(ctx, {
        type: 'line',
        data: {
            labels: ["M", "T", "W", "T", "F", "S", "S", "M"],
            datasets: [{
                label: 'Traffic',
                data: [0, 50, 100, 150, 200, 250, 300, 350],
                backgroundColor: [
                    'rgba(255, 99, 132, 0.2)',
                    'rgba(54, 162, 235, 0.2)',
                    'rgba(255, 206, 86, 0.2)',
                    'rgba(75, 192, 192, 0.2)',
                    'rgba(153, 102, 255, 0.2)',
                    'rgba(255, 159, 64, 0.2)'
                ],
                borderColor: [
                    'rgba(255,99,132,1)',
                    'rgba(54, 162, 235, 1)',
                    'rgba(255, 206, 86, 1)',
                    'rgba(75, 192, 192, 1)',
                    'rgba(153, 102, 255, 1)',
                    'rgba(255, 159, 64, 1)'
                ],
                borderWidth: 1
            }]
        },
        options: {
            scales: {
                yAxes: [{
                    ticks: {
                        beginAtZero: true
                    }
                }]
            }
        }
    });
</script>

...

Type
Question
4465 2
How to clean and build solution in visual studio code (.net core2)

Hi, I want to build and clean my project solution in visual studio code, but I can't find the option of clean and build in visual studio code, like we clean the project by clicking right project and click on "Clean" or "Build" in Visual Studio.

How can I do the same thing in visual studio code. Thanks.

...
Type
Question
4405 0
What is Partial View ? (MVC 5 Usage with examples)
In this article, you will get to understand about Partial View in MVC and when to use it and different ways to load it with example.
Type
Article

Page 10 of 27