Posts

Showing posts from February, 2022

Donate

How To Send Or Upload A Form With Multiple Files Using HttpPostedFileBase Array, jQuery And Ajax In ASP.NET MVC

Image
Good evening, This blog post demonstrates on how to upload or send a form with multiple files using HttpPostedFileBase class which is a property of a model class using jQuery and ajax in ASP.NET MVC. Given a sample model, I have declared a HttpPostedFileBase array property which is responsible for handling multiple files. public class clsWeeklyStatusReports { public Guid ID { get ; set ; } public string DomainName { get ; set ; } public string EmployeeName { get ; set ; } public DateTime SubmissionDate { get ; set ; } public string SubmissionDateDisplay { get { return SubmissionDate.ToString( "MM/dd/yyyy" ); } } public string MimeType { get ; set ; } public string FileName { get ; set ; } public HttpPostedFileBase[] Files { get ; set ; } public clsWeeklyStatusReportsGM() { ID = Guid.Empty; DomainName = string .Empty; EmployeeName = string .Empty; MimeType = string .Empty; FileName = string .Empty

Set Focus Or Auto Focus Input Control Using Inserted And Directive Not Working In Vue.js 3

Hello, Given the input element with an autofocus directive that on page load, this control get's focused right away. <input v-autofocus :class= "{ 'error' : empname.length > 22 }" /> The code to automatically focus the control is shown below using the inserted() method. directives:{ autofocus: { inserted(el){ el.focus(); } } } For some reasons the code above does not work in Vue.js 3x. After reading the docs, the solution that work was to use mounted() function instead of inserted() method if you're using Vue.js 3x. directives:{ autofocus: { mounted(el){ el.focus(); } } } Cheers!

How To Show Or Hide node_modules Folder In Visual Studio Code Editor

Image
Good evening! After adding the node modules using 'npm i' command in a Quasar or Vue.js project, I needed to show that folder in Visual Studio Code project explorer window since it's part of the project. Some of the solutions provided was to add some json configuration in settings.json which did not work. The solution that worked for me was to alter changes in Visual Studio Code Preferences itself. To proceed, go to File -> Preferences -> Text Editor -> Files and scroll down to locate the Exclude pane. Hover to the node_modules value and click the 'Remove Exclude Item' button. After that, the node_modules folder appears in the project explorer window. Cheers!

Donate