Thursday, May 25, 2023

How to Pass Exam AZ-900: Microsoft Azure Fundamentals.Quick Exam passing Recipe within Minimum time.

The Blog is about how to pass the AZ-900 Microsoft certification exam. You can pass the exam by taking and understanding the concepts of Cloud Computing. There are mainly three areas which we need follow to get AZ-900 Microsoft Azure Fundamentals Certified.






















 The Following three areas you need prepare for the exam.

  • Describe cloud concepts (25–30%)

  • Describe Azure architecture and services (35–40%)

  • Describe Azure management and governance (30–35%)

Find the details of all the three areas along with weightage of all parts that is covered in the exam, find Microsoft official link below for the all details.


The Link contains all the topics and concept include all basic information about the tools and services used in Azure Cloud to pass the exam.

Find the Link  contains complete details for Exam papers include all the slides and PDF and required materials for the Exam preparation and exam study and guide.

PDF and Slides:.


Quick Steps To Pass the Exam (AZ-900 - Microsoft Azure Fundamentals)

Find the Below steps to pass the Exam.

1 : Must have gone through whole blog step by step

2:  Find the pdf and all the slides from the google link must go through all the services and tools and all the topics in the slides. 

3; Once you have completed all the slides and you will get aware of all the cloud concepts its Architecture and services plus azure management and governance

4: Make sure go through slides and summary pdfs once all done go through the website 
Examtopic for the complete test questions and answers.

https://www.examtopics.com/exams/microsoft/az-900/

5: Go through all questions and answers and prepare your self well for the Exam.

These are the Simple steps through which you are able to get AZ-900 certified.
Share to me in the comment in case of clarification.









 

Friday, November 3, 2017

                var CellNo = $("#CellNo").val();
        var Designation = $("#designation_select_box").val();
        var Center = $("#center_select_box").val();




Dynamic div 


<script>
    $(document).ready(function () {
        var $sourceFields = $("#sourceFields");
        var $destinationFields = $("#destinationFields");
        var $chooser = $("#fieldChooser").fieldChooser(sourceFields, destinationFields);

       $.getJSON("Home/ItemDetails",
       function (json) {
           var res;

           var ItemDiv = $("#sourceFields");
           //Append each row to html table  
        for (var i = 0; i < json.length; i++) {
           
            //"<div>"
            //$('#sourceFields').html(json[i].item);
            //ItemDiv = "<div>" + json[i].item + "</div>";
            //$("<div/>").appendTo("div#ItemDiv");

            $("<div>" + json[i].item + "</div>").appendTo("#sourceFields");


            //ItemDiv.html('');
            //ItemDiv.html(json[i].item);
           // alert(ItemDiv);
        //    alert(ItemDiv);
        ////tr = $('<tr/>');
        //tr.append("<td>" + json[i].Id + "</td>");
        //tr.append("<td>" + json[i].Name + "</td>");
        //tr.append("<td>" + json[i].City + "</td>");
        //tr.append("<td>" + json[i].Address + "</td>");
        //$('table').append(tr);
    }
});


       $('#btnSave').click(function () {

       });
    });

    //function SaveItems() {
    //    alert('1');
    //    var ItemDiv2 = $("#destinationFields");
    //    //Append each row to html table  


    //    alert(ItemDiv.length);


    //}

</script>



<div id="fieldChooser" tabindex="1">
    <div id="sourceFields">
        
   
    
    
        @*<div>Item1</div>
        <div>Item2</div>
        <div>Item3</div>
        <div>Item4</div>
        <div>Item5</div>
        <div>Item6</div>
        <div>Item7</div>
        <div>Item8</div>*@
    </div>
    <div id="destinationFields">
    </div>

    <input type="button" value="Submit" id="btnSave" />
    @*<input type="button" value="Submit" onclick="SaveItems();" id="btnSave" />*@


</div>



/////////////////////////////////////////////
[HttpGet]
        public JsonResult ItemDetails()
        {
            List<ItemModel> ObjEmp = new List<ItemModel>()  
        {  
            new ItemModel  
            {  
                item = "Test1"  
            },  
            new ItemModel  
            {  
                item = "Test2"  
            },
             new ItemModel  
            {  
                item = "Test3"  
            },  
            new ItemModel  
            {  
                item = "Test4"  
            }  


        };
            
            return Json(ObjEmp, JsonRequestBehavior.AllowGet);
        }
//

Procedure Example

CREATE Procedure [dbo].[ECS_GetProductList_SP]
as
Select distinct SLS_PackageDetail_TB.Price,SLS_PackageDetail_TB.Price as [TotalAmount],SLS_PackageDetail_TB.Quantity,SLS_PackageDetail_TB.Product_Id ,
ORA_Products_TB.name,SLS_B_TaxPercentage_TB.TaxPercentage
Into #TemMyProductList
From SLS_PackageDetail_TB 
INNER JOIN ORA_Products_TB on SLS_PackageDetail_TB.Product_Id = ORA_Products_TB.Id 
Inner Join SLS_B_TaxDetail_TB On ORA_Products_TB.ID=SLS_B_TaxDetail_TB.Product_Id
Inner Join SLS_B_TaxPercentage_TB on SLS_B_TaxDetail_TB.Tax_ID=SLS_B_TaxPercentage_TB.id
where  SLS_PackageDetail_TB.Active='y' and
SLS_PackageDetail_TB.Active='Y' AND SLS_B_TaxDetail_TB.Active='y' AND ORA_Products_TB.Active='y'
order by ORA_Products_TB.name,SLS_PackageDetail_TB.Quantity asc
Select ROW_NUMBER() over (ORDER BY name) AS ID,* From #TemMyProductList

Drop Table #TemMyProductList

............

CREATE Procedure [dbo].[Ecs_ChangePinCode_Sp]
(@NicNo varchar(25),@ContactNumber varchar(15),
@OldPinCode varchar(6),@NewPincode varchar(6))
as
If Exists (Select sct.NIC_No,scnt.ContactNumber From SLS_ContactNumbers_TB scnt Inner Join SLS_Contact_TB sct on scnt.Contact_Id=sct.Id 
   where sct.NIC_No=@NicNo and scnt.ContactNumber=@ContactNumber and scnt.Pincode=@OldPinCode)
   Begin
   Update SLS_ContactNumbers_TB Set PinCode=@NewPincode where ContactNumber=@ContactNumber
   Select 1 as [Status],'Pincode Has been Changed'  as [Message]
   End
   Else
   Begin
   Select 0 as [Status],'Provide valid CellNo/Nic/OldPin' as [Message]
   End




web Controller plus views

 public class HomeController : Controller
    {
        public ActionResult Index()
        {
            ViewBag.Message = "Modify this template to jump-start your ASP.NET MVC application.";

            return View();
        }
        //[HandleError]
        //[HandleError(View = "ErrorDeatils")]
        public ActionResult About()
        {
            //ViewBag.Message = "Your app description page.";
            throw new Exception("Some unknown error encountered!");
            return View();
        }

        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";

            return View();
        }

        public ActionResult ShowGrid() {
            GetReportData();
            return View();
     
        }



        public ActionResult Getdata() {

            GetStateData();
            return View();
        }


        [HttpGet]
        public ActionResult GetStateData()
        {
            //  return View();
            var lstReportData = new List<States>();
            GetData ob = new GetData();
            var dt = ob.GetAllData();

            if (dt.Rows.Count > 0)
            {
                lstReportData = GetStateList(dt);
            }
            return Json(lstReportData, JsonRequestBehavior.AllowGet);
        }



        private List<States> GetStateList(DataTable dt)
        {
            var lsrCar = new List<States>();
            foreach (DataRow dr in dt.Rows)
            {
                var objPC = new States();
                objPC.State = dr["State"].ToString();
                objPC.City = dr["City"].ToString();
                lsrCar.Add(objPC);
            }
            return lsrCar;
        }


        [HttpGet]
        public ActionResult GetReportData()
        {
          //  return View();
            var lstReportData = new List<ActivityModel>();
            GetData ob = new GetData();
            var dt = ob.GetAllActivity();

            if (dt.Rows.Count > 0) {
                lstReportData = GetList(dt);
            }
           return  Json(lstReportData, JsonRequestBehavior.AllowGet);
        }



        private List<ActivityModel> GetList(DataTable dt)
        {
            var lsrCar = new List<ActivityModel>();
            foreach (DataRow dr in dt.Rows)
            {
                var objPC = new ActivityModel();
                objPC.id = dr["id"].ToString();
                objPC.name = dr["name"].ToString();
                objPC.active = dr["active"].ToString();
                lsrCar.Add(objPC);
            }
            return lsrCar;
        }


        public ActionResult NewGrid() {

            return View();
     
        }


        [HttpGet]
        public ActionResult GetCountryList()
        {

            var obj = new GetData();
            var dt = obj.GetAllCounrty();
            var ListCenter = GeCityList(dt).ToList();
            return Json(ListCenter, JsonRequestBehavior.AllowGet);

        }




        [HttpGet]
        public ActionResult GetCityList()
        {

            var obj = new GetData();
            var dt = obj.GetAllCity();
            var ListCenter = GeCityList(dt).ToList();
            return Json(ListCenter, JsonRequestBehavior.AllowGet);

        }

        private List<City> GeCityList(DataTable dt)
        {
            var lstcomplain = new List<City>();
            foreach (DataRow dr in dt.Rows)
            {
                var objPC = new City();
                objPC.Id = dr["Id"].ToString();
                objPC.Name = dr["Name"].ToString();
                lstcomplain.Add(objPC);
            }
            return lstcomplain;
        }
   
        //

        [HttpPost]
        public ActionResult SaveData(string StrMTL, string listvals)
        {
                List<string> strList = new List<string>();
                GetData ob = new GetData();
                ob.savedata(StrMTL, listvals);
                string Msg = "Complaint Assigned Successfully";
                strList.Add(Msg);
                return Json(strList, JsonRequestBehavior.AllowGet);
     
        }


    }

/////////////////////////////////////////////////////////////
@{
    ViewBag.Title = "Home Page";
}

<h3>We suggest the following:</h3>
<html>
<head>
    <title></title>
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.1.min.js"></script>
    <script type="text/javascript">

        $(document).ready(function () {

            fillCities();
            fillCountry();
        });


        function fillCities() {
            $.ajax({
                type: "GET",
                contentType: "application/json; charset=utf-8",
                url: '@Url.Action("GetCityList", "Home")',
                data: {},
                success: function (data) {
                    $.each(data, function (i, val) {
                        $('#ChooseLeft').append($('<option>', {
                            value: val.Id,
                            text: val.Name
                        }));
                    });
                },
                error: function (xhr, status) {
                },


                complete: function (data) {
                },

                dataType: "json"
            });
        }

        //selectcountry

        function fillCountry() {
            $.ajax({
                type: "GET",
                contentType: "application/json; charset=utf-8",
                url: '@Url.Action("GetCountryList", "Home")',
                data: {},
                success: function (data) {
                    $.each(data, function (i, val) {
                        $('#selectcountry').append($('<option>', {
                            value: val.Id,
                            text: val.Name
                        }));
                    });
                },
                error: function (xhr, status) {
                },


                complete: function (data) {
                },

                dataType: "json"
            });
        }


        function SaveData() {

       
           var StrMTL = $("#selectcountry").val();
           var a = hdvalues.value;
           var listvals = a.substring(0, a.length - 1)
           alert(listvals);
         
   

            if (StrMTL != "0") {
                $.ajax({
                    type: "POST",
                    contentType: "application/json; charset=utf-8",
                    url: '@Url.Action("SaveData", "Home")',
                    data: "{'StrMTL':'" + StrMTL + "','listvals':'" + listvals + "'}",
                    success: function (data) {
                        alert(data);
                   
                    },
                    error: function (xhr, status) {
                        alert('Unknown error ' + status);
                    },
                    dataType: "json"
                });
            }
            else {
                alert("Kindly Provide Fields !");
            }


        }






        $(function () {
            $("#ShiftRight,#ShiftLeft").click(function (event) {
                var ID = $(event.target).attr("ID");


                var ChooseFrom = ID == "ShiftRight" ? "#ChooseLeft" : "#ChooseRight";
                var moveTo = ID == "ShiftRight" ? "#ChooseRight" : "#ChooseLeft";

                var SelectData = $(ChooseFrom + " :selected").toArray();

                var result = "";
                var x = document.getElementById("ChooseLeft");
                for (var i = 0; i < x.options.length; i++) {
                    if (x.options[i].selected == true) {
                        alert(x.options[i].value);
                        result += x.options[i].value + ',';
                    }
                }
                //alert(result);

                hdvalues.value = result;
   
                alert(hdvalues.value);

                $(moveTo).append(SelectData);
                SelectData.remove;
            });
        });
    </script>
</head>
<body>




    <form method="get">


        <select id="selectcountry" style="width:202px;">
            <option value="0">Select</option>
        </select>


        <select id="ChooseLeft" multiple="multiple">
            @*<option value="1">Lucknow</option>
                <option value="2">Kanpur</option>
                <option value="3">Delhi</option>
                <option value="4">Gurgao</option>
                <option value="5">Noida</option>
                <option value="5">Agra</option>
                <option value="5">Banglore</option>
                <option value="5">Rajasthan</option>
                <option value="5">Pune</option>*@
        </select>
        <input id="ShiftRight" type="button" value=" ShftRight (>>) " />
        <input id="ShiftLeft" type="button" value="ShiftLeft(<<) " />

        <select id="ChooseRight" multiple="multiple"></select>



        <button id="submit3"  type="submit" onclick="SaveData();">Savedata</button>

    </form>



</body>
</html>
<input type="hidden"  id="hdvalues" />
/////////////////////////////////////////////////////////////////////////////////////////////////

For Grid work

@{
    ViewBag.Title = "ShowGrid";
    Layout = null;
}
<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.0.min.js"></script>


<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/themes/base/jquery-ui.css" rel="stylesheet" />
<script src="https://cdn.jsdelivr.net/jqgrid/4.6.0/jquery.jqGrid.min.js"></script>
<script src="https://cdn.jsdelivr.net/jqgrid/4.6.0/i18n/grid.locale-en.js"></script>
<script src="https://cdn.jsdelivr.net/jqgrid/4.6.0/jquery.jqGrid.min.js"></script>
<link href="https://cdn.jsdelivr.net/jqgrid/4.6.0/css/ui.jqgrid.css" rel="stylesheet" />


    <script type="text/javascript">
       
        $(document).ready(function () {
            var grid = jQuery("#myGrid");

            $(function () {
                "use strict";
                $("#myGrid").jqGrid({
                    url: '@Url.Action("GetReportData", "Home")',
                    data:JSON,
                    mytype: 'get',
                    colNames: ['ID', 'NAME','active'],
                    colModel: [
                    { name: 'ID', width: '35px' },
                    { name: 'Name', width: '160px' },

                    //{
                    //    name: 'enbl', index: 'enbl', width: 60, align: 'center',
                    //    formatter: 'checkbox', editoptions: { value: '1:0' },
                    //    formatoptions: { disabled: false },
                    //}
                    {
                        name: 'active', width: 60, align: 'center',
                        edittype: 'checkbox',
                        editoptions: { value: 'Yes:No', defaultValue: 'Yes' },
                        formatoptions: { disabled: false },
                        formatter: function (cellvalue, options, rowObject) {
                            return '<input type="checkbox" id="cbPassed-' + rowObject.ID +
                                (rowObject.active === true ? '" checked="checked" />' : '" />');
                        }
                    }

                   

                    ],


                    cmTemplate: { width: 220 },
                    beforeSelectRow: function (rowid, e) {
                        var $self = $(this), $td = $(e.target).closest("tr.jqgrow>td"),
                            iCol = $td.length > 0 ? $td[0].cellIndex : -1,
                            cmName = iCol >= 0 ? $self.jqGrid("getGridParam", "colModel")[iCol].Name : "",
                            localData = $self.jqGrid("getLocalRow", rowid);
                        if (cmName === "active" && $(e.target).is("input[type=checkbox]")) {
                            localData.active = $(e.target).is(":checked");
                        }

                        return true;
                    },

                    threeStateSort: true,
                    autoencode: true,
                    viewrecords: true,
                    sortorder: "asc",
                    pager: $('#myPager'),
                    rowNum: 5,
                    sortname: 'ID',
                    gridview: true,
                    sortorder: 'desc',
                    loadonce: true,
                    rowList: [5, 10, 20, 50],
                    width: 600,
                    height: 110,
                    viewrecords: true,
                    caption: 'Employee details in JQ Grid'
                });
            });


            //$("#button1").click(function() {
            //    var str = '';
            //    var data = grid.getRowData();
            //    for (i = 0; i < data.length; i++) {

            //        alert(data[i]);
            //        //if(data[i].checkbox==='1')
            //        //    str += data[i].ID+',';
            //    }
            //    alert(str);
            //});


            $('#btn').click(function () {
                var myGrid = $('#myGrid'), i, rowData, names = [],
                    rowIds = myGrid.jqGrid("getDataIDs"),
                    n = rowIds.length;
                for (i = 0; i < n; i++) {
                    rowData = myGrid.jqGrid("getLocalRow", rowIds[i]);
                    if (rowData.active) {
                        names.push(rowData.Name);
                    }
                     }

                //console.log(names);
                alert(names.join(";"));
            })
        });














        //    $('#btn').click(function () {
        //        var str = '';
        //        var myGrid = $('#myGrid'), i, rowData, names = [],
        //            rowIds = myGrid.jqGrid("getDataIDs"),
        //            n = rowIds.length;
        //        for (i = 0; i < n; i++) {
        //            rowData = myGrid.jqGrid("getLocalRow", rowIds[i]);
        //           // if (rowData.enbl==1) {
        //                if (rowData.enbl) {
        //                    //alert(rowIds);

        //                alert(rowData.ID);
        //                //str += rowData.ID + ',';
        //                 }
        //              }
        //        //alert(str);
        //    })

        //});



        //function Callfunc() {


        //    //alert('1');

        //    //var a = grid.get
        //    //alert(a);
        //    //var str = '';
        //    var data = grid.getRowData();
         
        //    for (i = 0; i < data.length; i++) {

        //        alert(data[i].ID);
        //        alert(data[i].length);
        //        //if (data[i].checkbox === '1')
        //        //    str += data[i].Id + ',';
        //    }
        //    //alert(str);

        //}

</script>
<style type="text/css">
    .ui-jqgrid .ui-widget-header {
        background-color: #336699;
        background-image: none;
        color: white;
    }

    .ui-jqgrid .ui-jqgrid-labels th.ui-th-column {
        background-color: #FFCC66;
        background-image: none;
        color: #336699;
        height: 30px;
        font-weight: bold;
    }
</style>

<h2>ShowGrid</h2>

<div>
    <table id="myGrid"></table>
    <div id="myPager"></div>


    <input type="button" value="CheckValues" id="btn"/>
</div>





DataMethods Plus Webconfig

web config:.

<connectionStrings> 
    <!-- Crm-Dev Tpl Test -->
    <add name="ApplicationServicesTest" connectionString="Data Source=172.16.2.86\SQL14;Initial Catalog=TPL_Test;User Id=crmsupport;Password=swbestteam" providerName="System.Data.SqlClient"/>
    <add name="ApplicationServices" connectionString="Data Source=MNET-PC;Initial Catalog=DbTest;User Id=sa;Password=sa123" providerName="System.Data.SqlClient"/>
  </connectionStrings>

---------------------------------------------------------------------------------------------
--before appsetting


public DataTable GetAllActivity()
        {
            var con = new SqlConnection(ConfigurationManager.ConnectionStrings["ApplicationServices"].ToString());
            var sqlad = new SqlDataAdapter("GetAllEmps", con);
            sqlad.SelectCommand.CommandType = CommandType.StoredProcedure;
            var ds = new DataSet();
            con.Open();
            sqlad.Fill(ds);
            con.Close();
            return ds.Tables[0];
        }

        public DataTable GetAllCity()
        {
            var con = new SqlConnection(ConfigurationManager.ConnectionStrings["ApplicationServices"].ToString());
            var sqlad = new SqlDataAdapter("GetCity", con);
            sqlad.SelectCommand.CommandType = CommandType.StoredProcedure;
            var ds = new DataSet();
            con.Open();
            sqlad.Fill(ds);
            con.Close();
            return ds.Tables[0];
        }

        public DataTable GetAllCounrty()
        {
            var con = new SqlConnection(ConfigurationManager.ConnectionStrings["ApplicationServices"].ToString());
            var sqlad = new SqlDataAdapter("GetCountry", con);
            sqlad.SelectCommand.CommandType = CommandType.StoredProcedure;
            var ds = new DataSet();
            con.Open();
            sqlad.Fill(ds);
            con.Close();
            return ds.Tables[0];
        }

        public DataTable savedata(string cityid, string countryid)
        {
            var con = new SqlConnection(ConfigurationManager.ConnectionStrings["ApplicationServices"].ToString());
            var sqlad = new SqlDataAdapter("InsertData", con);
            sqlad.SelectCommand.CommandType = CommandType.StoredProcedure;
            sqlad.SelectCommand.Parameters.AddWithValue("cityid", cityid);
            sqlad.SelectCommand.Parameters.AddWithValue("countryid", countryid);
            var ds = new DataSet();
            con.Open();
            sqlad.Fill(ds);
            con.Close();
            return ds.Tables[0];
        }


        public DataTable GetAllData()
        {
            var con = new SqlConnection(ConfigurationManager.ConnectionStrings["ApplicationServices"].ToString());
            var sqlad = new SqlDataAdapter("GetAlldata", con);
            sqlad.SelectCommand.CommandType = CommandType.StoredProcedure;
            var ds = new DataSet();
            con.Open();
            sqlad.Fill(ds);
            con.Close();
            return ds.Tables[0];
        }
////////////////////////////////////

SQL Procedure 
ALTER Procedure [dbo].[InsertData]
@cityid int,
@countryid varchar(100)

--@cityid int=2,
--@countryid varchar(100)='14,5'
As
Declare @t TABLE
(
EmployeeID INT,
Certs VARCHAR(8000)
)

INSERT @t VALUES (@cityid,@countryid)

SELECT  EmployeeID,
LTRIM(RTRIM(m.n.value('.[1]','varchar(8000)'))) AS Certs
into #temp FROM
(
SELECT EmployeeID,CAST('<XMLRoot><RowData>' + REPLACE(Certs,',','</RowData><RowData>') + '</RowData></XMLRoot>' AS XML) AS x
FROM   @t
)t
CROSS APPLY x.nodes('/XMLRoot/RowData')m(n)


Insert into tb1
select *from #temp

 Select 1 as [Status],'data Has been saved'  as [Message]

Drop Table #temp



Thursday, October 26, 2017

MVC Start Up web Links

http://www.guriddo.net/demo/guriddojs/selection/checkbox/index.html

http://www.c-sharpcorner.com/article/filters-in-Asp-Net-mvc-5-0-part-twelve/

http://www.c-sharpcorner.com/UploadFile/3d39b4/rendering-a-partial-view-and-json-data-using-ajax-in-Asp-Net/
http://www.c-sharpcorner.com/UploadFile/0c1bb2/bind-html-table-using-json-data-in-Asp-Net-mvc/

Login Form in MVC

@model KeDispatcher.Models.Login

//////
@using (Html.BeginForm(null, null, FormMethod.Post, new { id = "loginForm" }))
{
    <div class="wrapper">
        <div class="login-area clearfix">
            <div class="company-image"><img src="@Url.Content("~/Content/themes/red/images/login-logo.png")" width="296" height="89" /></div>
            <div class="login-msg">Please enter UserId and Password</div>
            <p></p>
            <div class="login-fields">
                @Html.TextBoxFor(m => m.userid, new { @class = "user-number", autocomplete = "off" })

                <p></p>
                @Html.PasswordFor(m => m.password, new { @class = "user-pin" })
            </div>
            <p></p>
            @*<p><img src="/Authentication/ShowCaptchaImage" /></p>*@
            @*<p>Please enter the string as shown above:</p>
                <p>@Html.TextBox("CaptchaText")</p>*@
            <div class="login-buttons clearfix">
                @*<span class="change-pin">@Html.ActionLink("Change PIN", "Login", "Authentication", new { onclick = "AlertEditNo();" })</span>*@
                <button id="btlogin" class="login-button">Log In</button>
                @ViewBag.result
            </div>
        </div>
        @if (!String.IsNullOrEmpty(@ViewBag.result))
        {
            @:
            <script type="text/javascript">alert('@ViewBag.result')</script>
        }
        @if (!String.IsNullOrEmpty(@ViewBag.result))
        {
            @:
            <script type="text/javascript">alert('@ViewBag.result')</script>
        }
        <!--Footer Start-->
        @*<div class="footer clearfix">
                <div class="footer-text">©2015 TPL Trakker All Right Reserved.</div>
            </div>*@
        <!--Footer End-->
    </div>
}

Sunday, March 29, 2015

ASP .Net WebForms applications /Asp.net MVC

  • The page lifecylce is simpler and more efficient
  • There is no such thing as controls besides html controls. You don't need to debug your output to see ASP .Net is generating.
  • ViewModels give you immense power and obliviate the need to do manual control binding and it eliminates many errors relating to binding.
  • You can have multiple forms on a page. This was a serious limitation on WebForms.
  • The web is stateless and MVC matches the architecture of the web more closely. Webforms introduces state and the bugs you have with it by introducing the Viewstate. The ViewState is automatic and works in the background, so it doesn't always behave the way you want to.
  • Web applications need to work with ajax these days. It's not acceptable to have full page loads anymore. MVC makes ajax so so much better, easier and more efficient with JQuery.
  • Because you can have multiple forms on a page, and because the architecture is driven by calls to urls, you can do funky things like ajax load a different form, like an edit form into your current page using JQuery. Once you realise what this lets you do you can do amazing things easily.
  • ASP .Net WebForms is not only an abstraction over html, it is an extremely complex one. Sometimes you would get a weird bug and struggle with it for much longer than need be. In many cases you could actually see what it was doing wrong but you are unable to do anything about it. You end up doing weird workarounds.
  • WebForms does not make a good technology for designers. Designers often like doing html directly. In MVC its a view, in WebForms its half a day of work.
  • As the web platform is evolving fast WebForms wont keep up. Its not aware of new tags or features of HTML5, it will still render the same stuff unless you get (often) expensive 3rd party controls or wait for Microsoft to issue an update.
  • Controls in WebForms limit you in so many ways. In MVC you can just grab a JQuery library and integrate it into your templates.

Wednesday, January 16, 2013

Mobile captured Video not playing on server


Media Issues And Solutions


Error Description:.

We are enable to connect to the content that you are requested.We are apologise for the inconvenience.


Solution:.

MP4 videos require a MIME type on your server to play properly
If MP4 videos do not display when your Articulate content is hosted on a server, it's likely that the server is not configured to play these files.
Some servers do not have an associated MIME type to support MP4 files. To correct this issue, add an MP4 MIME type to your server. Here's how:
  1. Right-click the site in IIS and select Properties.
  2. Select the HTTP Headers Tab.
  3. Select File Types.
  4. Under the MIME Map section, select New Type.
  5. Type ".mp4" as the associated extension and "video/mpeg" as the content type.
  6. Click OK.
Your MP4 movies should now play when viewed from the server. If you use a hosting company to host your files, it's best to check with them about adding MP4 as a supported MIME type.

Tuesday, January 1, 2013

Asp.net Hidding columns with different Methods

1) Hiding Columns using CSS:


<style type="text/css">
    .hidden
    {
        display: none;
    }
</style>

 
<asp:GridView runat="server" ID="gvHiddenColumnsCSS" AutoGenerateColumns="False"
    Caption="<b>1) using CSS</b>" CellPadding="4" BorderStyle="Solid" ForeColor="#333333"
    GridLines="None" BorderColor="#507CD1">
    <AlternatingRowStyle BackColor="White" />
    <Columns>
        <asp:BoundField DataField="Id" HeaderText="ID" ItemStyle-CssClass="hidden" 
                        ControlStyle-CssClass="hidden" HeaderStyle-CssClass="hidden" 
                        FooterStyle-CssClass="hidden" />
        <asp:BoundField DataField="Name" HeaderText="Name" />
    </Columns>
    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
    <RowStyle BackColor="#EFF3FB" />
</asp:GridView>
 
Above gridview displays only Name column where as ID column will be hidden. Still, we will be able to retrieve ID value as
string strID= gvHiddenCSS.Rows[row Index].Cells[0].Text;
 2) Hiding Columns using DataKeys:
We can use Datakeys to add one or more columns which are not displayed in the GridView. Following my
previous example, We can add ID as Datakeys and remove the boundfield (ID column) from the GridView.
<asp:GridView runat="server" ID="gvHiddenDataKeys" AutoGenerateColumns="False" CellPadding="4" BorderStyle="Solid" ForeColor="#333333" GridLines="None" BorderColor="#507CD1" Caption="<b>2) using DataKeys</b>" DataKeyNames="ID"> <AlternatingRowStyle BackColor="White" /> <Columns> <asp:BoundField DataField="Name" HeaderText="Name" /> </Columns> <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" /> <RowStyle BackColor="#EFF3FB" /> </asp:GridView>
 
We can retrieve ID value as


string strID=gvHiddenDataKeys.DataKeys[row index].Value.ToString();


3) Hiding Columns using Visible Property
 
<asp:GridView runat="server" Caption="<b>3) using Visible Property</b>" ID="gvHiddenVisible"
    AutoGenerateColumns="False" CellPadding="4" BorderStyle="Solid" ForeColor="#333333"                                                                                              
    GridLines="None" BorderColor="#507CD1" OnDataBinding="gvHiddenVisible_DataBinding"
    OnDataBound="gvHiddenVisible_DataBound">
    <AlternatingRowStyle BackColor="White" />
    <Columns>
        <asp:BoundField DataField="ID" HeaderText="ID" />
        <asp:BoundField DataField="Name" HeaderText="Name" />
    </Columns>
    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
    <RowStyle BackColor="#EFF3FB" />
</asp:GridView>
protected void gvHiddenVisible_DataBinding(object sender, EventArgs e)
{
    gvHiddenVisible.Columns[0].Visible = true;
}
protected void gvHiddenVisible_DataBound(object sender, EventArgs e)
{
    gvHiddenVisible.Columns[0].Visible = false;
}

 
 




only Name column where as ID column will be hidden. Still, we will be able to retrieve ID value as

string strID= gvHiddenCSS.Rows[row Index].Cells[0].Text;

 

Saturday, October 20, 2012

Restored Database/Diagrams Support/SQL-Server 2005


After restoring DB in SQL Server 2005 db most of the time I get the following error:

Database diagram support objects cannot be installed because this database does not have a valid owner. To continue, first use the Files page of the Database Properties dialog box or the ALTER AUTHORIZATION statement to set the database owner to a valid login, then add the database diagram support objects.

Solution

1. Right Click on your database, choose properties
2. Goto the Options Page
3. In the Dropdown at right labeled "Compatibility Level" choose "SQL Server 2005(90)"
4. Goto the Files Page
5. Enter "sa" in the owner textbox.
6. Hit OK

This Work for me but not work move further!!

But for some reason these steps did not work.... After googling for a while I quickly found
the following suggestion which worked just fine for me....

EXEC sp_dbcmptlevel 'yourDB', '90';
go
ALTER AUTHORIZATION ON DATABASE::yourDB TO "yourLogin"
go
use [yourDB]
go
EXECUTE AS USER = N'dbo' REVERT
go

Saturday, August 4, 2012

Entity Framework ,Linq to Sql Issues & Solutions

Error

The type ‘System.Data.Objects.DataClasses.EntityObject’ is defined in an assembly that is not referenced

Solution:.

Entity Framework bug can be resolved by simply add refrence to the solution file.the refence we need to add is  "System.Data.Entity ".Apply by right Click on the solution file


Error

The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid.

Solution

The Above has been found in entity framwork .To reolve this error simply copy your connectionstring from one solution to Main web config File.The error occur when we run multiple projects wihtin a project.The solution enable to read the entity connection properly.this could be resolve by the defined way

Thursday, March 8, 2012

Configure IIS 7.5 Some Issues and Solutions

IIS 7.5 one the Latest Addition of web server consits few of the new Features that make life easier for web developers and provide better security features and enhanced deploys then other iis versions .I am explaining step by step how to configure iss 7.5 for Vs 4.0 Asp.net applications.

Steps to Configure Asp.net Apps On IIS 7.0 and 7.5:.

There are Few things you need to fix early by click on root node of iis.

Anonymous Authentication should enable
Classic.netAppPool must have identity Local
Enable directory Browser if disable
Check on ISAPI and CGI restrictions

Configure Asp.net Compile File to IIS Virtual Directory

1- Create Virtual directory
2- Convert that directory to the Application by right click on it.
3- By Appling all these steps you can configure your Asp 4.0 app to iis 7.5

However Few of the issues has been defined with there solutions.

Issues And Solutions In IIS 7.5 Deployment:.

Error :.

Login Failed For user IISAppPoolClassic.Net Pool

It seems that new IIS version 7.5 runs its Classic .NET AppPool process with a different identity, and from there we get error "Login failed for user 'IIS APPPOOLClassic .NET AppPool'".

Solutions






  • go into Internet Information Services (IIS) Manager



  • expand node with your computer name on left side and select "Application Pools"



  • now in the window on the right side, right click "Classic .NET AppPool" and select "Advanced    Settings..."





  •  find "Identity" property and change its value to "LocalSystem"
     By Appling the Above your Appplication will surely give the response Inshallah......


    Error 2:.

    The page you are requesting cannot be served because of the ISAPI and CGI Restriction list settings on the Web server.The page you are requesting cannot be served because of the ISAPI and CGI Restriction list settings on the Web server.

    Solution

    You will usually get the error ” The page you are requesting cannot be served because of the ISAPI and CGI Restriction list settings on the Web server” on IIS 7.0 if the ISAPI and CGI restriction is set on the webserver . You can solve the problem by disabling this restriction . You can do so by going to IIS manager , click on the hostname of the server , double click Isapi and CGI restrictions , click Edit Feature settings on the top right hand corner and the check the check box Allow unspecified CGI modules and Allow unspecified ISAPI modules .



    Error 3:.

    Server Error in Web Application

    Unsupported Operation. A document processed by the JRC engine cannot be opened in the C++ stack.
    Solution:.

    we will have this error when the reports where not present at source.we need check out the location where we place the publish file.Vs 2010 bydefult not attach the reports with publish file so we need to paste the .rpt files on the particular location where we have publish our application.In this way you can have access of Crystal reports through IIS.
     

    Sunday, December 25, 2011

    Sqlserver Issues ,Security Max Size(2005/2008 sql)

    These are some of the Maximum Capacity Specifications for SQL Server 2008/2005 the Maximum size upto

    * Database size: 524,272 terabytes
    * Databases per instance of SQL Server: 32,767
    * Filegroups per database: 32,767
    * Files per database: 32,767
    * File size (data): 16 terabytes
    * File size (log): 2 terabytes
    * Rows per table: Limited by available storage
    * Tables per database: Limited by number of objects in a database

    DataInsertion From One DataBase Column to Another DataBase Column

    we need to write the following query to Insert Data from One Database column to another database column while the column name must be same in both of the tables and the datatype of the columns.

    "Insert Into ProductDB2.dbo.Items(itm_ItemCode,itm_ItemDesc)
    Select SupplyChaindb.dbo.SI_Item.itm_ItemCode,SupplyChaindb.dbo.SI_Item.itm_ItemDesc from SupplyChaindb.dbo.SI_Item"


    Insert Into ProductDB2.dbo.Items(itm_ItemCode,itm_ItemDesc)Select SupplyChaindb.dbo.SI_Item.itm_ItemCode,SupplyChaindb.dbo.SI_Item.itm_ItemDesc from SupplyChaindb.dbo.SI_Item where SupplyChaindb.dbo.SI_Item.itm_Active='1'

    Debug Sqlserver Stored Procedure:.

    Create the above procedure.

      PROCEDURE Procdebug @in INT, @out INT out BEGINIF ( @in IS NULL ) SET
    @in = 0 WHILE ( @in < = 100 ) BEGIN SET @out = @in SET @in = @in + 10 PRINT CONVERT(VARCHAR, @in) + ' - ' + CONVERT(VARCHAR, @out) END END
    GO
    DECLARE
    EXEC
    SELECT
    @out INT Procdebug 5,@out OUTPUT @out
    After creating stored procedure , select the second script to debug it. After selecting press F11, screen will open sored procedure in debug mode.Keep Press the F11 Button to continue all the cycles of debuging by press the F11 button you will the overall stage values.


    CREATE
    AS