Tuesday 12 March 2019


Sunday 3 February 2019

 var shell = PowerShell.Create();
            var sxr = File.ReadAllText(@"C:\Users\vinod\Desktop\demo.ps1");

            // Add the script to the PowerShell object
            shell.Commands.AddScript(File.ReadAllText(@"C:\Users\vinod\Desktop\demo.ps1"));

            // Execute the script
            var results = shell.Invoke();

            var middleIndex = Math.Round((decimal)(results.Count()/ 2));
           foreach (var qq in results )
            {
                var a = qq.Members["InputObject"];
                var b = qq.Members["SideIndicator"];



            }

 <Reference Include="System.Management.Automation" />

$book1=Get-Content "C:\Users\vinod\Desktop\planes.xml"
$book1=$book1 | Foreach {$_.Trim()}
$book2=Get-Content "C:\Users\vinod\Desktop\planes2.xml"
$book2=$book2 | Foreach {$_.Trim()}
Compare-Object $book1 $book2 

Tuesday 29 January 2019

Part 2 : Basic textbox and javascript button click Event


In this we will see how we construct the page with basic table and basic javascript button event  as below  :

<html>
<!--(Html tag is starting tag for all the web pages)-->
<head>
    <!--(Inside head tag , we need to keep CSS style,Page title etc)-->
   <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

    <script>

        $(document).ready(function () {
      console.log("welcome"); <!-- console.log("")  will log in the console tab from  developer tool by pressing f12 in the browser we get the developer tool   -->
               
                       <!-- alert("welcome"); -->

$("#btnSave").click(function()
{
  console.log("Student Name is  : " +$("#txtName").val());
    console.log("Student Address  is: " +$("#txtAddress").val());
});

        });

    </script>
    <style>
        <!--

        ( inside style tag we need to add style to be applied to the page ) -->
        h1{
            color: blue;
        }

    </style>
</head>

<body>
    <!--(body tag is main tag which is visible in the browser after rendering the page)-->
    <h1>Student Registeration</h1>

<table>

<tr>
     <td>Name : </td>
<td> <input type="text" id="txtName" /></td>
</tr>
<tr>
     <td>Address : </td>
<td> <input type="text" id="txtAddress" /></td>
</tr>
 
</table>

<input type="button" id="btnSave" value="Save"/>
 
</body>
</html>

GitHub repo  : https://github.com/vinodvskp/WebTraining/blob/master/part2.htm

After running the page you need  , enter some name and address in the textboxes , click on the save button , press f12 open the developer tools you will  see below output :