Saturday, 28 June 2014

HTTP Error 500.19 - Internal Server Error

ha ha ha...
it took me a long time to solve... just published my MVC app to local file directory and planning to browse this under IIS 8.5 and stuck with this error...
I enabled IIS from CP Add windows features on/off BUT I didn't know I would have some more stuff to do...

  • Click "Start button"
  • in the search box, enter "Turn windows features on or off"
  • in the features window, Click: "Internet Information Services"
  • Click: "World Wide Web Services"
  • Click: "Application Development Features"
  • Check (enable) the features. I checked all but CGI.

that's all... 

Sunday, 15 June 2014

JQuery AutoCompleteUI with custom parameter...

When we work with JQuery AutoCompleteUI sometimes we need to pass additional parameter to the server to filter the Resul/AutoComplete data. To send additional data we need to work a little bit more. here I'm showing how we can achieve our goal:


 $("#TextBox").autocomplete({
        source: function (request, response) {
            $.ajax({
                url: "/Accounting/Group/GetGroupNameJson/",  <===== your URL (I's working on MVC)
                datatype: "json",
                data: {
                    filter: $("#dropdown").val(), <========= the value of dropdown list need for filtering
                    term: request.term               <=========this term will be automatic found from #TextBox
                },
                success: function (data) {
                    response(data); <this data contains not only 'label' but also 'value'
                }
            });
        },
        minLength: 1, <==============min length to start search
        select: function (event, ui) {
            event.preventDefault(); <=== this line required
            $('input[name="ThisField"]').val(ui.item.label);
            $('input[name="AnotherField"]').val(ui.item.value);
            return false;
        },
        focus: function (event, ui) {
            event.preventDefault();
            $("#ThisField").val(ui.item.label);
        },
        //position: { my: "right bottom", at: "left top", collision: "flip" },
    });