Tuesday, July 28, 2015

Twitter bootstrap popover close all before opening a new one

Here a simple solution

$('.link-popover').click(function(){
    $('.link-popover').not(this).popover('hide');
});

Thanks

Saturday, July 18, 2015

Php/Mysql date saved as '0000-00-00'

The date format in Mysql is yyyy-mm-dd. Therefore we should convert the date as "Y-m-d".

$newdate= date("Y-m-d", strtotime($date));

Wednesday, July 1, 2015

ModelState.IsValid always false

Put this line above ModelState condition and check the values you getting for variable errors.

var errors = ModelState.Values.SelectMany(v => v.Errors);
 
 

Tuesday, May 5, 2015

A potentially dangerous Request.Form value was detected from the client

You can see this error everytime when you submit HTML code to the server. To avoid this set validateRequest="false" in the page and in .net 4 you need to add this <httpRuntime requestValidationMode="2.0" /> to the web.config file. Thanks Lasa

Friday, January 23, 2015

Invalid anonymous type member declarator MVC

I got this error message when i use  @data-group in ActionLink.

@Html.ActionLink(cardCategory.Name, "Index", new { controller = "Home" }, new { @class = "btn btn-default btn-lg btn-filter", @data-group = "C" })

Use an underscore _ - the Razor engine is smart enough to translate that to a data- attribute.

TinyMCE Insert/Edit link not editable

 To fix this add  e.stopImmediatePropagation()  as below. $(document).on('focusin', function (e) {             if ($(e.target).close...