Showing posts with label ASP.Net Razor. Show all posts
Showing posts with label ASP.Net Razor. Show all posts

Tuesday, 24 December 2024

Summernote Image Upload at server in ASP.NET MVC5 using C#

 




Summernote is an online WYSIWYG (What You See Is What You Get) editor that is lightweight and easy to integrate into any platform. Its tools resemble those of MS Word, making it user-friendly and intuitive. By default, Summernote stores images as base64 strings in the database. However, this approach is not ideal from a bandwidth and performance perspective.

A better solution is to store images on a server and save only the file paths in the editor. Summernote also supports adding images via URL, providing additional flexibility.

In this post, I share my custom solution for saving images to a server and integrating them into the editor. Although the example is based on an ASP.NET MVC5 C# web application, the approach is platform-independent and uses jQuery AJAX to handle image uploads.

Wednesday, 6 November 2024

Send OTP Using C# MVC5

 



This blog post will guide you through implementing OTP verification during user signup using C# in ASP.NET MVC5. I've simplified the steps to make the OTP verification process clear and easy to Implement.

Saturday, 26 February 2022

Force to Refresh Javascript and CSS files on page load

 To force Javascript and CSS files on every time while page load is good practice when working on live operation because when you made any change in CSS and Javascript files then updated content reflects when cntl + f5 pressed otherwise system get file from cash to save to reload time. Given code below help you to force reload file on every page load in C# ASP.Net MVC.


@{
    Random ob = new Random();
    int ran = ob.Next();
}

<script src="~/AppJs/product.js?v=@ran"></script>
<link href="~/AppCss/gcss.css?v=@ran" rel="stylesheet" type="text/css">