We already have a Razor concept in .Net.When you use Razor it facilitates the user to use limited C# features in the View of the MVC architecture. This eases the developers to reduce the use of HTML and Javascript. In the same fashion but in a larger form, Microsoft has come with the concept of Blazor in .NET.With this newly added feature, you can build interactive web UIs using C# instead of JavaScript.Blazor is composed of Client side components i.e (HTML, CSS, Javascript)as well as the server-side components(C# ). This means both client and server code is written in C#, making the developers reuse the libraries and the other server-side components thereby extending the developer platform with tools and libraries for building web apps.
Let’s see the Difference between MVC Razor and Blazor in C#
@section CustomScripts{
<script src="@Url.Content("~/Content/CustomScripts/Menu.js")"></script>
<script src="@Url.Content("~/Content/CustomScripts/Functions.js")"></script>
}
@if (TempData["Result"] != null)
{
if (TempData["Result"].ToString() == "Fail" || TempData["Result"].ToString() == "Exists")
{
<div class="row" style="display: block;padding:10px">
<div class="col-xl-12">
<div id="panels" class="panel"><div class="alert alert-block alert-danger"><button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button><i class="fa pr10 fa-times"></i><strong>Sorry,something went wrong. Please try again.</strong></div></div>
</div>
</div>
}
}
@section CustomScripts{
<script src="@Url.Content("~/Content/CustomScripts/Menu.js")"></script>
<script src="@Url.Content("~/Content/CustomScripts/Functions.js")"></script>
}
@if (TempData["Result"] != null)
{
if (TempData["Result"].ToString() == "Fail" || TempData["Result"].ToString() == "Exists")
{
<div class="row" style="display: block;padding:10px">
<div class="col-xl-12">
<div id="panels" class="panel"><div class="alert alert-block alert-danger"><button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button><i class="fa pr10 fa-times"></i><strong>Sorry,something went wrong. Please try again.</strong></div></div>
</div>
</div>
}
}
Also read:
20 Important C# interview questions for experienced
20 Important jQuery interview questions for experienced
C#- Programming Guide | Starting Phase
20 Important SQL Server interview questions for experienced
Mumbai, often referred to as the financial capital of India, is a hub for businesses and industries. With countless corporate…
When it comes to security services in Noida, there are several reputable companies that cater to various needs. Let me…
Are you tired of dealing with tooth decay, gum problems, and expensive dental treatments? Look no further! Steel Bite Pro…
In the world of fine jewelry, oval moissanite rings have emerged as a captivating choice for those seeking elegance and…
Noida, located in the state of Uttar Pradesh, is a fast-growing hub of digital marketing agencies in India. Choosing the…
As we move into 2023, the world of motorcycles in India is set to see some exciting changes. Manufacturers are…
Leave a Comment