Author: Prakash

Posted in MVC

Create a custom autocomplete control in ASP.NET MVC

How to create a custom HTML control in ASP.NET MVC? using System; using System.Web.Mvc; namespace MvcApplication1.Helpers {…

Posted in SQL Interview Questions

Nth Highest Salary

Create table #tblEmployee (Id int, [Name] varchar(100), City varchar(100), Salary decimal (10,3)) Insert into #tblEmployee values(1, ‘Prakash…

Posted in

Generate x509 certificate in pem, cer and pfx and export public key

Generate x509 cerntifcate c:\Demo>openssl req -x509 -days 365 -newkey rsa:2048 -keyout my-key.pem -out -my-cert.pem Generating a RSA…

Posted in

Send an image (stored as base64 string) inline in email

Byte[] bitmapData = Convert.FromBase64String(FixBase64ForImage(“Base64 string”)); System.IO.MemoryStream streamBitmap = new System.IO.MemoryStream(bitmapData); var imageToInline = new LinkedResource(streamBitmap, MediaTypeNames.Image.Jpeg); imageToInline.ContentId…

Posted in MVC

Put/Delete http verb not working server

Please add following code in web.cofig file. <system.webServer> <modules> <remove name="WebDAVModule"/> <remove name="FormsAuthentication" /> <remove name="ApplicationInsightsWebTracking" />…

Posted in Life - Spiritual - Reality

Honesty and humanity is not only demesne of people who has status in society

The day 6th September 2016, I and my friend met at tea stall near G-2 circle for…

Posted in HTML5 CSS3

Dynamically add rows and html controls in table using jQuery

How to add rows dynamically in HTML table with textbox and textarea controls. Example: Download <html> <head>…

Posted in

FirstOrDefaultAsync(), SingleOrDefaultAsync etc extension methods are not showing.

Make sure that you have added using System.Data.Entity; namespace in your class.

Posted in HTML5 CSS3

CSS style problem with MVC rendered checkboxes using MVC helper

I have faced the issue with CSS for checkboxes in mvc. Below is mvc code. @Html.CheckBoxFor(model =>…

Posted in Life - Spiritual - Reality

7 points will taking care of your life

On 12 Feb 2017, I met Vishwas Jambu and Nikhileswarananda in a conference at Anand the Milk…