Posts

Showing posts from March, 2016

ASP.NET AJAX Jquery pass parameter to user control and create user control dynamicaly

Image
Issues rendering UserControl using Server.Execute() in an ASMX web service.
Issues ICustomParams not defined.

Output: getting usercontrol having grid in Jquery popup through ajax. (Click to enlarge)



 I will explain how to dynamically load ASP.Net UserControl using jQuery and AJAX and add it to the ASP.Net page. Also we can see how to dynamically pass parameters to ASP.Net UserControl using jQuery AJAX.

Step1:
Interface
First we need to implement an interface. create a ICustomParams.vb in app_code folder.

Public Interface ICustomParams
    Property docType() As String
    Property project() As String
End Interface

This will solve exception of IcustomerParams
Step2:
UserControl
Add a web usercontrol(display1.ascx) file with implement the ICustomParams interface, like this

Public Class display1
    Inherits System.Web.UI.UserControl
    Implements ICustomParams
    Private docType As String
    Private project As String
    Public Property idocType() As String Implements ICustomParams.docType
    …

Powershell: Disable windows 10 update permanently

Windows Update:

It create problems when you are going to give a presentation and windows start to update itself for long. There is no setting available in control panel to stop it from downloading the update. One more problem is that it consumes the bandwidth in background to dowmload the updates.

Here is a way to control the windows 10 update behaviour:

Copy below script in notepad and save the file as noupdate.ps1  ( notepad save as text file by default so select all files from dropdown while saving)

Clear-Host
Write-Host "1 -> Never check for updates (Dont make you in trouble for your presentation)"
Write-Host "2 -> Check for updates but let me choose whether to download and install them(will not consume your bandwidth)"
Write-Host "3 -> Download updates but let me choose whether to install them"
Write-Host "4 -> Install updates automatically (recommended)"
Write-Host "Enter any character to exit"
Write-Host
switch(Read-Host &qu…

Google+ Followers