13 Jul 2018 13 Jul 2018 0 Comments  98 Views
Here Mudassar Ahmed Khan has explained with an example, how to upload (Save) HTML5 Canvas Image to Server in Folder (Disk) in ASP.Net using C# and VB.Net.

For illustration purpose, the jQuery Sketch plugin will be used to allow users draw Signatures and later the HTML5 Canvas Image of the Signature will be uploaded to Server and saved as Image in Folder (Disk) using ASP.Net.
13 Jul 2018 13 Jul 2018 0 Comments  102 Views
Here Mudassar Ahmed Khan has explained with an example, how to upload and insert MP3 Audio files in SQL Server Database and then play the MP3 Audio files using HTML5 Audio Player in ASP.Net using C# and VB.Net.

The MP3 Audio files are displayed in GridView and there’s also a Download button to download the MP3 Audio files.
13 Jul 2018 13 Jul 2018 0 Comments  74 Views
Here Mudassar Ahmed Khan has explained with an example, how to make GridView TextBox ReadOnly (Disabled) in ASP.Net when Editing using C# and VB.Net.

The TextBox in ASP.Net GridView will be made ReadOnly or Disabled during the Edit Mode of GridView inside the Row being currently edited using C# and VB.Net.
11 Jul 2018 13 Jul 2018 0 Comments  301 Views
Here Mudassar Ahmed Khan has explained with an example, how to make a Column (Cell) non-editable (ReadOnly) in ASP.Net GridView when Editing using C# and VB.Net.
10 Jul 2018 10 Jul 2018 0 Comments  332 Views
Here Mudassar Ahmed Khan has explained with an example, how to populate (bind) Crystal Report using Entity Framework as Data Source in ASP.Net MVC Razor.

This article will illustrate how to configure Entity Framework and connect to SQL Server database and then finally use the Entity Framework data to populate Crystal Reports in ASP.Net MVC Razor.
10 Jul 2018 10 Jul 2018 0 Comments  280 Views
Here Mudassar Ahmed Khan has explained with an example, how to populate (bind) RDLC Report using Entity Framework as Data Source in ASP.Net MVC Razor.

This article will illustrate how to configure Entity Framework and connect to SQL Server database and then finally use the Entity Framework data as Data Source to populate RDLC Reports in ASP.Net MVC Razor.
10 Jul 2018 10 Jul 2018 0 Comments  311 Views
Here Mudassar Ahmed Khan has explained with an example, how to implement jQuery AutoComplete DropDown (ComboBox) in ASP.Net MVC 5 Razor.

The jQuery AutoComplete plugin is actually applied to a TextBox but it can be made to work as a DropDown (ComboBox) by populating the AutoComplete results on TextBox focus as well as when User types in some Text.

The data for the jQuery AutoComplete DropDown (ComboBox) will be populated from database using Entity Framework in ASP.Net MVC Razor.
06 Jul 2018 06 Jul 2018 0 Comments  472 Views
Here Mudassar Ahmed Khan has explained with an example, why Request.Browser.IsMobileDevice property does not work in ASP.Net.

ASP.Net does have in-built mobile phone browser detection capabilities and you can check whether user is using a Mobile phone browser or Desktop browser using the Request.Browser.IsMobileDevice property.

But with time, new Operating Systems and Mobile devices are being launched, thus since the information for is not present the Mobile Devices are not being detected.
06 Jul 2018 06 Jul 2018 0 Comments  384 Views
Here Mudassar Ahmed Khan has explained with an example, how to detect mobile phone browser (mobile device) in ASP.Net MVC Razor.

With the help of Regular Expressions (Regex), one can easily detect and find whether the User is using a Desktop browser or mobile phone browser (mobile device) in ASP.Net MVC Razor.
06 Jul 2018 06 Jul 2018 0 Comments  378 Views
Here Mudassar Ahmed Khan has explained with an example, how to sort (reorder) Table rows with jQuery using Drag and Drop method.

The HTML Table rows will be sorted (reordered) with Drag and Drop method using the jQuery UI Sortable Plugin.
05 Jul 2018 05 Jul 2018 0 Comments  444 Views
Here Mudassar Ahmed Khan has explained with an example, how to display Confirmation Box (Dialog) before Form Submit in ASP.Net MVC Razor.

The JavaScript Confirmation Message Box (Dialog) will be displayed using jQuery by attaching a Submit event handler to the Form.

When the Submit button is clicked, the Confirmation Message Box (Dialog) with OK (Yes) and Cancel (No) buttons will be displayed, if the User clicks OK (Yes) button only then the Form will be submitted and the Controller’s Action method will be called.
05 Jul 2018 05 Jul 2018 0 Comments  367 Views
Here Mudassar Ahmed Khan has explained with an example, how to implement confirm before Submit on ASP.Net Button Click using JavaScript.

The JavaScript Confirmation Message Box will be displayed on Button Click using ClientScript.RegisterOnSubmitStatement function.

When the Button is clicked, the Confirmation Message Box with OK (Yes) and Cancel (No) buttons will be displayed, if the User clicks OK (Yes) button only then the Form will be submitted i.e. Click event will fire.
05 Jul 2018 05 Jul 2018 0 Comments  286 Views
Here Mudassar Ahmed Khan has explained with an example, how to validate TextBox in Windows Application (WinForms) using C# and VB.Net.

The validation of TextBox will be performed using the Validating event handler and the error message will be displayed using the ErrorProvider control in Windows Application (WinForms) using C# and VB.Net.
05 Jul 2018 05 Jul 2018 0 Comments  364 Views
Here Mudassar Ahmed Khan has explained with an example, how to perform Custom Paging in WebGrid using Stored Procedure and Entity Framework in ASP.Net MVC Razor.

Custom Paging will be performed at Database level inside the Stored Procedure using the ROW_NUMBER function.

The PageIndex and PageSize values will be passed to the Stored Procedure using Entity Framework and only the specific records will be fetched and displayed in WebGrid, thus reducing the bandwidth usage.
04 Jul 2018 04 Jul 2018 0 Comments  392 Views
Here Mudassar Ahmed Khan has explained with an example, how to use multiple Submit buttons in Single Form in ASP.Net MVC Razor.

One Form can do a POST submission to one Action method in Controller and hence in order to use multiple Submit buttons inside one single Form, a Switch case has to be implemented inside the Action method.

The Switch case detects the clicked Submit button by fetching its Value from the Request.Form collection and the appropriate action is performed.
04 Jul 2018 04 Jul 2018 0 Comments  388 Views
Here Mudassar Ahmed Khan has explained with an example, how to use For Each loop for populating DropDownList using Model in ASP.Net MVC Razor.

HTML SELECT element will be created in View and a For Each loop will be executed over the Model to create and add HTML OPTION elements to the DropDownList.

The Selected Value of DropDownList is easily available using Model or using Request.Form collection, but in order to get the Selected Text, the Selected Text is copied to a Hidden Field using jQuery and then it is fetched inside Controller in ASP.Net MVC Razor.
03 Jul 2018 03 Jul 2018 0 Comments  681 Views
Here Mudassar Ahmed Khan has explained with an example, how to perform Select Insert Edit Update and Delete (CRUD) using Single Stored Procedure in ASP.Net MVC Razor.

Single Stored Procedure will be called using Entity Framework and a parameter named Action will be used to send instructions about the operation to be performed in SQL Server database. Single Stored Procedure CRUD operation will be performed by calling the Controller Action methods using jQuery AJAX and JSON in ASP.Net MVC Razor.
03 Jul 2018 03 Jul 2018 0 Comments  298 Views
Here Mudassar Ahmed Khan has explained with an example, how to show (display) Text in ComboBox when no item selected in Windows Application using C# and VB.Net.

The Text when no Item is selected is displayed in ComboBox using a Default First Value (Item) which is added after the ComboBox is populated from Database in Windows Forms Application using C# and VB.Net.
03 Jul 2018 03 Jul 2018 0 Comments  334 Views
Here Mudassar Ahmed Khan has explained with an example, how to attach Double Click event handler to WebGrid Row using jQuery in ASP.Net MVC Razor.

A Client Side Double Click event handler will be attached to the WebGrid row using jQuery and thus when the WebGrid row is double clicked, the data from the selected WebGrid row will be fetched using jQuery and will be posted in JSON format to the Controller’s Action method using Form Submission in ASP.Net MVC Razor.
29 Jun 2018 29 Jun 2018 0 Comments  668 Views
Here Mudassar Ahmed Khan has explained with an example, how to disable Back button in Browser after Logout using JavaScript.

Browser Back button cannot be disabled and hence in order to prevent User navigating to previous page, the User is redirected back to the Current page forcefully using JavaScript.
29 Jun 2018 29 Jun 2018 0 Comments  468 Views
Here Mudassar Ahmed Khan has explained with an example, how to Disable Browser Back Button using JavaScript (jQuery) in ASP.Net MVC Razor.

The technique is to prevent user from navigate to previous page using Back Button of the browser or the back option in the Context Menu.
29 Jun 2018 29 Jun 2018 1 Comments  564 Views
Here Mudassar Ahmed Khan has explained with an example, how to bulk import CSV file data into SQL Server database using SqlBulkCopy in ASP.Net using C# and VB.Net.

The CSV file will be uploaded and its data will be read into a DataTable and the DataTable data will be inserted into database using SqlBulkCopy in ASP.Net.
28 Jun 2018 28 Jun 2018 0 Comments  596 Views
Here Mudassar Ahmed Khan has explained with an example, how to check if data already exists in Database using ASP.Net with C# and VB.Net.

This article will make use of ASP.Net AJAX PageMethods for calling static Web Methods and checking whether data already exists in Database in ASP.Net.
28 Jun 2018 28 Jun 2018 0 Comments  525 Views
Here Mudassar Ahmed Khan has explained with an example, how to load data on demand on scroll in WebGrid using jQuery AJAX in ASP.Net MVC Razor.

The WebGrid has Fixed (Freezed) Header Row and the Data Rows have a Scrollbar and when the Scrollbar is scrolled, an AJAX call is made to the Controller’s Action method and the data is loaded in WebGrid.

The records from Database are loaded in WebGrid Page Wise as the data is scrolled using jQuery AJAX, JSON and Entity Framework in ASP.Net MVC Razor.
28 Jun 2018 28 Jun 2018 0 Comments  387 Views
Here Mudassar Ahmed Khan has explained with an example, how to bind (populate) jQuery jsTree TreeView plugin from Database in ASP.Net MVC Razor.

The records from Database will be fetched using Entity Framework and a JSON string will be generated and assigned to the ViewBag object.

Finally the JSON string in the ViewBag object will be used as source data for the jsTree TreeView plugin.