Tuesday, 23 December 2014

Display Html Control using Datepicker control of jQuery,Jquery Ui Widgets Date Picker Control



Jquery Ui Widgets Date Picker Control:
Task 1:Display Html Control using Datepicker control of jQuery?
DatePicker:
Jquery Ui provides a method i.e datepicker() to be applied to an input element type of text to be appear as datepicker ,calendar based control to pick the date for certain fields such as date of birth,eventdate
Syn:$(selector).date               
UI  design:
<head runat="server">
    <title></title>
    <link rel="stylesheet" type="text/css" href="themes/jquery-ui-1.11.2/jquery-ui.theme.css" />
    <script type="text/javascript" src="Scripts/jquery-2.1.1.js"></script>
    <script type="text/javascript" src="Scripts/jquery-ui-1.11.2.js"></script>
    <script type="text/javascript">

        $(document).ready(function () {
       
        $("#txt1").datepicker();
        });
    </script>
<div align="center">
    <b>Enter Date of Birth</b>
    <input type="text" id="txt1" />
   
    </div>

Task 2:Display Date Of birth Field With Following Options?

<head runat="server">
    <title></title>
    <link rel="stylesheet" type="text/css" href="themes/jquery-ui-1.11.2/jquery-ui.theme.css" />
    <script type="text/javascript" src="Scripts/jquery-2.1.1.js"></script>
    <script type="text/javascript" src="Scripts/jquery-ui-1.11.2.js"></script>
    <script type="text/javascript">

        $(document).ready(function () {
       
        $("#txt1").datepicker();
        });
    </script>
<div align="center">
    <b>Enter Date of Birth</b>
    <input type="text" id="txt1" />
   
    </div>

Monday, 22 December 2014

Multi-threading in C#,Multithreaded Programming Using C#


Hai friend today I am going to say about Multithreaded Programming Using C#
In .net Multithreaded stands for executing the code parallel when we take two methods  and execute the code is executed sequential manner the code first method and then come to second method .if u want to code execute parallely we go for Multithreaded concept 

Program:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            Thread obj1 = new Thread(data1);
            Thread obj2 = new Thread(data2);
            obj1.Start();
            obj2.Start();
           
        }

        public static void data1()
        {
            for (int i = 0; i <= 10; i++)
            {
                Console.WriteLine("this is my data" + i.ToString());
            }
        }

        public static void data2()
        {
            for (int i = 0; i <= 10; i++)
            {
                Console.WriteLine("this is my newdata" + i.ToString());
            }
            Console.ReadLine();
        }
    }
}

  Output:



  




Threads are of two type Fore Ground thread and background thread
When coming to Fore Ground thread even your main application quit then also they will thread complete their task
When come to back ground threads which will quit whenever main application quit