@{
    ViewBag.Title = "Apply Now";
    // Layout = "~/Views/Shared/_ApplicationLayout.cshtml";

    Layout = null;


}

@model upes_admission.Models.page1
<!doctype html>
<html lang="en">
<head>
    <!-- Required meta tags -->
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <!--Style-->
    <link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,500,700,800,900" rel="stylesheet">
    <link href="../css/component.css" rel="stylesheet" />
    <link href="../css/main.css" rel="stylesheet" />
    <link href="../css/ApplicationTemplate.css" rel="stylesheet" />
    <!--Custom Css-->
    <title>UPES | Application Form</title>
</head>
<body>
    <!--Application Template-->
    <header class="position-relative">
        <section class="HeaderPanel HeaderBanner">
            <div class="plr70">
                <div class="headerInner">
                    <a href="application-form.html">
                        <img src="../img/application/upes logo.png" class="img-fluid" alt="Logo" />
                    </a>
                </div>
            </div>
            <!--Helpline Chat-->
            <div class="helplineChatPanel ">
                <div class="plr70">
                    <div class="helplineChatInner fontBold ">
                        <a href="javascript:void(0);">
                            <img src="../img/application/helpline.png" class="img-fluid" alt="helpline" />
                            <span>Helpline</span>
                        </a>
                        <a href="javascript:void(0);">
                            <img src="../img/application/chat.png" class="img-fluid" alt="helpline" />
                            <span>Chat</span>
                        </a>
                    </div>
                </div>
            </div>
        </section>

    </header>
    <main role="main" class="ApplicationTemplate">
        <section class="FormTemplate formBlkStyle">
            <div class="FormPosition">
                <div class="TitlePanel text-center">
                    <h1 class="fontExBold ApplicationTitle">Application Form</h1>
                    <p class="App_Text fontMedium">
                        Thank you for your interest in studying at the UPES.
                    </p>
                </div>
                <!--Form Panel-->
                <div class="FormPanel">
                    <div class="formDetailStrip">
                        <ul class="StripStyle">
                            <li class="active">
                                <div class="StepImg">
                                    <img src="../img/application/personal-1.png" class="img-fluid Icon-active" />
                                </div>
                                <p class="fontBold DetailText">Personal <span class="d-block">Details</span> </p>
                            </li>
                            <li>
                                <div class="StepImg">
                                    <img src="../img/application/academic-0.png" class="img-fluid Icon-noactive" />
                                    <img src="../img/application/academic-1.png" class="img-fluid Icon-active" />
                                </div>
                                <p class="fontBold DetailText">Academic  <span class="d-block"> History </span></p>
                            </li>
                            <li>
                                <div class="StepImg">
                                    <img src="../img/application/payment-0.png" class="img-fluid Icon-noactive" />
                                    <img src="../img/application/payment-1.png" class="img-fluid Icon-active" />
                                </div>
                                <p class="fontBold DetailText">Payment</p>
                            </li>
                            <li>
                                <div class="StepImg">
                                    <img src="../img/application/academic-0.png" class="img-fluid Icon-noactive" />
                                    <img src="../img/application/academic-1.png" class="img-fluid Icon-active" />
                                </div>
                                <p class="fontBold DetailText">Complete <span>Application</span></p>
                            </li>
                        </ul>
                    </div>
                    <!--PanelOne-->

                    @using (Html.BeginForm("Apply", "Home", FormMethod.Post))
                    {

                        @Html.ValidationSummary(true)

                    <div class="FormPanelInner" id="FormPanelOne">
                        <p class="fontMedium form-text">Your Details</p>
                        <div class="form-group">
                            <input type="text" class="form-control FormStyle" id="txtfirstname" placeholder="First Name*" />

                            @*@Html.TextBoxFor(model => model.firstname, new { @class = "form-control", placeholder = "First Name*" })
            @Html.ValidationMessageFor(model => model.firstname)*@
                        </div>
                        <div class="form-group">
                            <input type="text" class="form-control FormStyle" placeholder="Middle Name*" id="middlename" />
                        </div>
                        <div class="form-group">
                            <input type="text" class="form-control FormStyle" placeholder="Last Name*" id="lastname" />
                        </div>
                        <div class="row FormRow ">
                            <div class="col-sm-6 form-group">
                                <p class="form-text fontMedium">
                                    Date of Birth
                                </p>
                                <div id="datepicker" class="input-group date" data-date-format="dd-mm-yyyy">
                                    <input class="form-control FormStyle " placeholder="dd/mm/yyyy" id="datebind"/>
                                    
                                    <span class="input-group-addon datepickicon"></span>
                                </div>
                            </div>
                            <div class="col-sm-6 form-group">
                                <p class="form-text fontMedium">
                                    City
                                </p>
                                <input type="text" class="form-control FormStyle" id="city" />
                            </div>
                        </div>
                        <div class="form-group">
                            <input type="text" class="form-control FormStyle" placeholder="Email ID*" id="email" />
                        </div>
                        <div class="form-group">
                            <input type="text" class="form-control FormStyle" placeholder="Phone* " id="phone" onkeypress="return isNumber(event);" />
                        </div>
                        <div class="FormRadioOptions">
                            <p class="form-text fontMedium">What would you like to study at UPES?</p>
                            <div class="row radioInner">
                                <label>
                                    <input type="radio" id="radug" class="Radiostyle" name="value1" checked /><span>Undergraduate (UG)</span>
                                </label>
                                <label class="noPadding">
                                    <input type="radio" id="radpg" class="Radiostyle" name="value1" /><span>Postgraduate (PG)</span>
                                </label>
                            </div>
                            <select class="FormStyle selectpickers" id="cource">
                                <option value="0">Select Course</option>
                                <option>UG</option>
                                <option>PG</option>
                            </select>
                            <p class="form-MediumText fontMedium">You can choose specialisations of your choice in later step.</p>
                        </div>
                        <p class="form-text fontMedium">How did you know about UPES?</p>
                        @*<input type="text" class="form-control FormStyle" placeholder="Select Source " id="source" />*@


                        <select class="FormStyle selectpickers" id="source">
                           
                            
                        </select>


                        <div class="FormButtonStyle">
                            <div class="text-right">
                                <button class="btn btn-primary BtnStyle" type="button" onclick="gotoFormPanelTwo()">Next</button>
                            </div>
                        </div>
                    </div>

                    }


                    <!--PanelTwo-->
                    <div class="FormPanelInner" id="FormPanelTwo" style="display:none">
                        <div class="FormRadioOptions">
                            <p class="fontMedium form-text">10th class Details</p>
                            <div class="row radioInner">
                                <label>
                                    <input type="radio" class="Radiostyle" name="value2" checked /><span>Percentage</span>
                                </label>
                                <label class="noPadding">
                                    <input type="radio" class="Radiostyle" name="value2" /><span>CGPA</span>
                                </label>
                            </div>
                            <div class="ClassDetails row mlr">
                                <div class="col-6 plr7">
                                    <select class="FormStyle" id="tenthyearofpassing">
                                        <option value="0">Year of Passing</option>
                                        <option>2000</option>
                                        <option>2010</option>
                                    </select>
                                </div>
                                <div class="col-6 plr7">
                                    <input type="text" onkeypress="return isNumber(event);" id="tenthmark" class="form-control FormStyle" placeholder="Marks in Percentage " />
                                </div>
                            </div>
                        </div>
                        <div class="FormRadioOptions">
                            <p class="fontMedium form-text">12th class Details</p>
                            <p class="form-MediumText fontMedium">Are you appearing for exams this academic year?</p>
                            <div class="row radioInner">
                                <label>
                                    <input type="radio" id="radtwyes" value="Yes" class="Radiostyle" name="radtwappear" checked /><span>Yes</span>
                                </label>
                                <label class="noPadding">
                                    <input type="radio" id="radtwno" value="No" class="Radiostyle" name="radtwappear" /><span>No</span>
                                </label>
                            </div>
                            <div class="ClassDetails row mlr">
                                <div class="col-6 plr7">
                                    <select class="FormStyle"  id="twyearofpassing">
                                        <option value="0">Year of Passing</option>
                                        <option>2019</option>
                                       
                                    </select>
                                </div>
                            </div>
                        </div>
                        <div class="FormRadioOptions">
                            <p class="fontMedium form-text">Marks</p>
                            <p class="form-MediumText fontMedium">Are you appearing for exams this academic year?</p>
                            <div class="row radioInner">
                                <label>
                                    <input type="radio" id="radtwper" class="Radiostyle" name="value4" checked /><span>Percentage</span>
                                </label>
                                <label class="noPadding">
                                    <input type="radio" id="radtwpcm" class="Radiostyle" name="value4" /><span>PCM Percentage</span>
                                </label>
                            </div>
                            <div class="ClassDetails row mlr">
                                <div class="col-6 plr7 ">
                                    <input type="text" onkeypress="return isNumber(event);" id=twper class="form-control FormStyle" placeholder="Marks in Percentage " />
                                </div>
                            </div>
                            <div class="mt30">
                                <input type="text" id="twsclclg" class="form-control FormStyle" placeholder="Name of School/College " />
                            </div>
                        </div>
                        <div class="FormButtonStyle row no-gutters">
                            <div class="text-left col-6">
                                <button class="btn btn-primary BtnStyle BtnStyleforBack" onclick="backtoFormPanelOne()">Back</button>
                            </div>
                            <div class="text-right col-6">
                                <button class="btn btn-primary BtnStyle" onclick="gotoFormPanelThree()">Next</button>
                            </div>
                        </div>
                    </div>
                    <!--PanelThree-->



                    <div class="FormPanelInner" id="FormPanelThree" style="display:none">
                        <div class="Fees">
                            <p class="fontMedium form-text">Application Form Fees</p>
                            <span class="fontBold feeText">&#8377; 1850</span>
                        </div>
                        <div class="FormRadioOptions">
                            <p class="fontMedium form-text">Choose a payment method</p>
                            <div class="row radioInner RadioList no-gutters">
                                <div class="col-4 RadioListStyle">
                                    <label class="noPadding">
                                        <input type="radio" class="Radiostyle" name="value5" checked /><span>Credit Cards</span>
                                    </label>
                                </div>
                                <div class="col-4 RadioListStyle">
                                    <label class="noPadding">
                                        <input type="radio" class="Radiostyle" name="value5" /><span>Debit Cards</span>
                                    </label>
                                </div>
                                <div class="col-4 RadioListStyle">
                                    <label class="noPadding">
                                        <input type="radio" class="Radiostyle" name="value5" /><span>Net Banking</span>
                                    </label>
                                </div>
                                <div class="col-4 RadioListStyle">
                                    <label class="noPadding">
                                        <input type="radio" class="Radiostyle" name="value5" /><span>UPI</span>
                                    </label>
                                </div>
                                <div class="col-4 RadioListStyle">
                                    <label class="noPadding">
                                        <input type="radio" class="Radiostyle" name="value5" /><span>Digital Wallets</span>
                                    </label>
                                </div>
                            </div>
                        </div>
                        <div class="FormButtonStyle row no-gutters">
                            <div class="text-left col-6">
                                <button class="btn btn-primary BtnStyle BtnStyleforBack" onclick="backtoFormPanelTwo()">Back</button>
                            </div>
                            <div class="text-right col-6">
                                <button class="btn btn-primary BtnStyle" onclick="gotoFormPanelFour()">Next</button>
                            </div>
                        </div>
                    </div>
                    <!--Panel Four-->
                    <div class="FormPanelInner noborder" id="FormPanelFour" style="display:none">
                        <div class="PaymentSuccessful">
                            <h2 class="fontBold paymentText">
                                <img src="../img/application/tick.png" class="img-fluid" alt="icon" />
                                <span>Payment Successful</span>
                            </h2>
                        </div>
                        <div class="confirmationPanel">
                            <p class="fontMedium ">
                                Confirmation has been sent to you Email ID
                                <a href="mailto:example@example.com">example@example.com</a>
                            </p>
                            <p class="fontMedium ">
                                and Phone Number
                                <a href="tel:+91 91919190022">91919190022</a>
                            </p>
                            <div class="RememberPanel">
                                <p class="form-MediumText">Things to Remember</p>
                                <ul>
                                    <li>Complete this form in next 48 hours, or else it will be considered incomplete</li>
                                    <li>You can edit your application form details till 26th April'19</li>
                                </ul>
                            </div>
                        </div>
                        <div class="Pref_Spl CategoryPanel">
                            <p class="fontMedium form-text">Preferred of Specialisations (You can select upto 3)</p>
                            <div class="SplList">
                                <div class="FormRadioOptions Scroll">
                                    <div class="SplRadiostyle">
                                        <label class="noPadding">
                                            <input type="radio" class="Radiostyle" name="spl1" checked /><span>Computer Science</span>
                                        </label>
                                    </div>
                                    <div class="SplRadiostyle">
                                        <label class="noPadding">
                                            <input type="checkbox" class="Radiostyle" name="spl1" checked /><span>Information Tech</span>
                                        </label>
                                    </div>
                                    <div class="SplRadiostyle">
                                        <label class="noPadding">
                                            <input type="checkbox" class="Radiostyle" name="spl1" checked /><span>Data Science</span>
                                        </label>
                                    </div>
                                    <div class="SplRadiostyle">
                                        <label class="noPadding">
                                            <input type="checkbox" class="Radiostyle" name="spl1" /><span>Cybersecurity Engineering</span>
                                        </label>
                                    </div>
                                    <!--Duplicate Datas-->
                                    <div class="SplRadiostyle">
                                        <label class="noPadding">
                                            <input type="checkbox" class="Radiostyle" name="spl1" /><span>Cybersecurity Engineering</span>
                                        </label>
                                    </div>
                                    <div class="SplRadiostyle">
                                        <label class="noPadding">
                                            <input type="checkbox" class="Radiostyle" name="spl1" /><span>Cybersecurity Engineering</span>
                                        </label>
                                    </div>
                                    <div class="SplRadiostyle">
                                        <label class="noPadding">
                                            <input type="checkbox" class="Radiostyle" name="spl1" /><span>Cybersecurity Engineering</span>
                                        </label>
                                    </div>
                                    <div class="SplRadiostyle">
                                        <label class="noPadding">
                                            <input type="checkbox" class="Radiostyle" name="spl1" /><span>Cybersecurity Engineering</span>
                                        </label>
                                    </div>
                                    <div class="SplRadiostyle">
                                        <label class="noPadding">
                                            <input type="checkbox" class="Radiostyle" name="spl1" /><span>Cybersecurity Engineering</span>
                                        </label>
                                    </div>
                                    <div class="SplRadiostyle">
                                        <label class="noPadding">
                                            <input type="checkbox" class="Radiostyle" name="spl1" /><span>Cybersecurity Engineering</span>
                                        </label>
                                    </div>
                                    <div class="SplRadiostyle">
                                        <label class="noPadding">
                                            <input type="checkbox" class="Radiostyle" name="spl1" /><span>Cybersecurity Engineering</span>
                                        </label>
                                    </div>
                                    <div class="SplRadiostyle">
                                        <label class="noPadding">
                                            <input type="checkbox" class="Radiostyle" name="spl1" /><span>Cybersecurity Engineering</span>
                                        </label>
                                    </div>
                                    <div class="SplRadiostyle">
                                        <label class="noPadding">
                                            <input type="checkbox" class="Radiostyle" name="spl1" /><span>Cybersecurity Engineering</span>
                                        </label>
                                    </div>
                                    <div class="SplRadiostyle">
                                        <label class="noPadding">
                                            <input type="checkbox" class="Radiostyle" name="spl1" /><span>Cybersecurity Engineering</span>
                                        </label>
                                    </div>
                                    <!--Duplicate Datas ends-->
                                </div>
                            </div>
                        </div>
                        <!--Photo and Decalaration-->
                        <div class="Pref_Spl CategoryPanel">
                            <p class="fontMedium form-text">Your Photo and Declaration</p>
                            <div class="drag_dropPanel">
                                <div class="form-group drapDropStyle">
                                    <label class="sr-only" for="inputFile">File Upload</label>
                                    <div id="inputFile">
                                        <input type="file" class="form-control-file" onchange="readUrl(this)"
                                               data-title="Drag and drop to upload or">
                                        <p class="selectFiles">Select files</p>
                                        <h5>
                                            [We only support JPG and PNG images under IMB and no larger than 500px on either side at this time]
                                        </h5>
                                    </div>
                                </div>
                            </div>
                            <div class="row radioInner declartionText">
                                <label>
                                    <input type="radio" class="Radiostyle" name="dec1" /><span>
                                        I hereby declare lorem ipsum dolor sit amet, consectetur adipiscing elit...
                                    </span>
                                </label>
                            </div>
                        </div>
                        <div class="FormRadioOptions CategoryPanel">
                            <p class="fontMedium form-text">Category</p>
                            <div class="row radioInner RadioList no-gutters">
                                <div class="col-4 RadioListStyle">
                                    <label class="noPadding">
                                        <input type="radio" class="Radiostyle" name="caste" checked  value="General"/><span>General</span>
                                    </label>
                                </div>
                                <div class="col-4 RadioListStyle">
                                    <label class="noPadding">
                                        <input type="radio" class="Radiostyle" name="caste" value="Differently Abled" /><span>Differently Abled</span>
                                    </label>
                                </div>
                                <div class="col-4 RadioListStyle">
                                    <label class="noPadding">
                                        <input type="radio" class="Radiostyle" name="caste" value="OBC" /><span>OBC</span>
                                    </label>
                                </div>
                                <div class="col-4 RadioListStyle">
                                    <label class="noPadding">
                                        <input type="radio" class="Radiostyle" name="caste" value="SC" /><span>SC</span>
                                    </label>
                                </div>
                                <div class="col-4 RadioListStyle">
                                    <label class="noPadding">
                                        <input type="radio" class="Radiostyle" name="caste" value="ST" /><span>ST</span>
                                    </label>
                                </div>
                            </div>
                        </div>
                        <div class="FormRadioOptions CategoryPanel">
                            <p class="form-text fontMedium">Are you a Domicile of Uttarakhand?</p>
                            <div class="row radioInner RadioList no-gutters">
                                <div class="col-4 RadioListStyle">
                                    <label class="noPadding">
                                        <input type="radio" value="Yes" class="Radiostyle" name="domicile" checked /><span>Yes</span>
                                    </label>
                                </div>
                                <div class="col-4 RadioListStyle">
                                    <label class="noPadding">
                                        <input type="radio" value="No" class="Radiostyle" name="domicile" /><span>No</span>
                                    </label>
                                </div>
                            </div>
                            <p class="form-text fontMedium">Enter your Address</p>
                            <div class="form-group  ">
                                <input type="text" id="address1" class="form-control FormStyle" placeholder="Address Line 1 " />
                            </div>
                            <div class="form-group">
                                <input type="text" id="address2" class="form-control FormStyle" placeholder="Address Line 2 " />
                            </div>
                            <div class="form-group col-6 noPadding">
                                <input type="text" id="pincode" maxlength="20" class="form-control FormStyle" placeholder="Pincode " onkeypress="return isNumber(event);" />
                            </div>

                            <div class="form-group col-6 noPadding">
                                <select class="FormStyle" id="pstate"></select>
                            </div>

                            <div class="form-group col-6 noPadding">

                                <select class="FormStyle" id="pcity"></select>
                                @*<input type="text" id="pcity" class="form-control FormStyle" placeholder="City " />*@
                            </div>
                        </div>
                        <div class="FormRadioOptions ">
                            <p class="fontMedium form-text">Your Mode of Application</p>
                            <div class="row radioInner RadioList no-gutters">
                                <div class="col-6 RadioListStyle">
                                    <label class="noPadding">
                                        <input type="radio" value="Through UPES Entrance Exam" class="Radiostyle" name="radapplicationmade" checked /><span>Through UPES Entrance Exam</span>
                                    </label>
                                </div>
                                <div class="col-6 RadioListStyle">
                                    <label class="noPadding">
                                        <input type="radio" value="Through IIT JEE Test Scores" class="Radiostyle" name="radapplicationmade" /><span>Through IIT JEE Test Scores</span>
                                    </label>
                                </div>
                            </div>
                        </div>
                        <div class="FormButtonStyle row no-gutters">
                            <div class="text-left col-6">
                                <button class="btn btn-primary BtnStyle BtnStyleforBack" onclick="backtoFormPanelThree()">Back</button>
                            </div>
                            <div class="text-right col-6">
                                <button class="btn btn-primary BtnStyle" onclick="gotoThankyou()">Finish</button>
                            </div>
                        </div>
                    </div>


                </div>

            </div>
        </section>
    </main>
    <!--Footer-->
    <footer>
        <section class="FooterPanel">
            <div class="foot_Btm foot_Btm_Height">
                <div class="plr70">
                    <div class="footBtmRow foot_Btm_Height row align-items-center no-gutters">
                        <div class="col-sm-6 copyRights">
                            <h5 class="text-uppercase fontBold">
                                &copy;Copyright&copy; 2018 The
                                University of Petroleum & Energy Studies
                            </h5>
                        </div>
                        <div class="col-sm-6 SocialIcon d-flex justify-content-end align-items-center">
                            <p class="text-uppercase fontBold">Follow Us On:</p>
                            <div class="social_icon_menus">
                                <a href="javascript:void(0);">
                                    <img src="../img/application/facebook-black.png" class="img-fluid" />
                                </a>
                                <a href="javascript:void(0);">
                                    <img src="../img/application/twitter-black.png" class="img-fluid" />
                                </a>
                                <a href="javascript:void(0);">
                                    <img src="../img/application/insta-black.png" class="img-fluid" />
                                </a>
                                <a href="javascript:void(0);">
                                    <img src="../img/application/youtube-black.png" class="img-fluid" />
                                </a>
                                <a href="javascript:void(0);">
                                    <img src="../img/application/linkedin-black.png" class="img-fluid" />
                                </a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
    </footer>
    <script type="text/javascript" src="../scripts/component.js"></script>
    <script type="text/javascript" src="../scripts/upes-appliaction.js"></script>
    <script>
        //$('#datepicker').datepicker({
        //    uiLibrary: 'bootstrap4'
        //});
        /**upload**/


        $(function () {
            var date = new Date();
            date.setDate(date.getDate());

            $('#datepicker').datepicker({
              //  startDate: date
            });
        });




        function readUrl(input) {
            if (input.files && input.files[0]) {
                let reader = new FileReader();
                reader.onload = (e) => {
                    let imgData = e.target.result;
                    let imgName = input.files[0].name;
                    input.setAttribute("data-title", imgName);
                    console.log(e.target.result);
                }
                reader.readAsDataURL(input.files[0]);
            }

        }
    </script>

  


    @if (Session["stage"] != null)
    {
        <input type="hidden" id="hdnstage" value="@Convert.ToInt32(Session["stage"])" />
    }
    else
    {
        <input type="hidden" id="hdnstage" value="0" />
    }
   


    <script>
        $(document).ready(function () {

            var updatestage =@Convert.ToInt32(Session["stage"]);



          //  alert(updatestage);

       

          // alert(updatestage);

            if (updatestage == 1) {
               // alert(stage);
                $('#FormPanelTwo').show();
                $('#FormPanelOne').hide();
                $('.StripStyle li:nth-child(2)').addClass('active');
                $('.StripStyle li:first-child p').hide();
            }

            else if (updatestage == 2) {
              //  alert(updatestage);
                $('#FormPanelTwo').hide();
                $('#FormPanelOne').hide();
                $('#FormPanelThree').show();
                $('#FormPanelFour').hide();
                $('.StripStyle li:last-child').removeClass('active');
                $('.StripStyle li p').hide();
                $('.StripStyle li:nth-child(3) p').show();

            }

            if (updatestage ==3) {
               // alert(updatestage);
                $('#FormPanelFour').show();
                $('#FormPanelThree').hide();
                $('#FormPanelTwo').hide();
                $('#FormPanelOne').hide();
                $('.StripStyle li:last-child').addClass('active');
                $('.StripStyle li p').hide();
                $('.StripStyle li:last-child p').show();
            }


            console.log("ready!");
        });


        $(document).ready(function () {

            //bind bindenquirysource
            var serviceURL = '/Home/bindenquirysource';
            $.ajax({
                url: serviceURL,
                type: "GET",
                dataType: "HTML",
                async: false,
                success: function (data) {
                  //  alert(data);

                    if (data != "") {


                        $("#source").html(data);

                    }
                    else {
                        alert("Error");
                    }
                    //  alert(data);

                }
            });



            var serviceURLstate = '/Home/bindstate';
            $.ajax({
                url: serviceURLstate,
                type: "GET",
                dataType: "HTML",
                async: false,
                success: function (data) {
                    //  alert(data);

                    if (data != "") {

                        $("#pstate").html(data);

                    }
                    else {
                        alert("Error");
                    }
                    //  alert(data);

                }
            });


            $("#pstate").change(function () {

              

                var stateid = $("#pstate").val();

           

                var serviceURLcity = '/Home/bindcity';
                $.ajax({
                    url: serviceURLcity,
                    type: "GET",
                    dataType: "HTML",
                    data: {
                        stateid: stateid
                    },
                    async: false,
                    success: function (data) {
                        //  alert(data);

                        if (data != "") {

                            $("#pcity").html(data);

                        }
                        else {
                            alert("Error");
                        }
                        //  alert(data);

                    }
                });

            });

           



        });


    </script>
</body>
</html>