Font chữ khi export Gridview sang PDF sử dụng thư viện itextsharp

Khi export dữ liệu từ Gridview sang định dạng PDF sử dụng thư viện itextsharp, font chữ thường không đúng định dạng,

sau đây là một số bài viết giải quyết vấn đề này.

1. http://stackoverflow.com/questions/6110311/how-to-write-utf-8-characters-to-a-pdf-file-using-itextsharp

2. http://stackoverflow.com/questions/4902033/itextsharp-5-polish-character/4903223

3. http://stackoverflow.com/questions/1322303/html-to-pdf-some-characters-are-missing-itextsharp

4. http://www.codeproject.com/Articles/196019/Display-Chinese-Characters-in-PDF-created-by-iText

5. http://forums.asp.net/t/1868974.aspx/1?Export+Binded+Gridview+to+Any+Doc+Excel+or+Word+or+Any+format+

Calling a jquery function from code behind in asp.net

1. Calling a jquery function from code behind in asp.net

  function topBar(message) {
        alert(message);
        var alertDiv = $('<div id="alert">' + message + '</div>');
        $(document.body).append(alertDiv);
        var $alert = $('#alert');

It’s possible that your body tag isn’t loaded at the time of the script running, which would mean that the$(document.body) reference would be empty – which jquery would silently fail to add the alert div to. Either way, it never hurts to wrap your calls in a $(document).ready event:

    ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "json",
              "$(document).ready(function() { topBar('Successfully Inserted');});", true);

iOS 6.0 caching Ajax POST requests

Bản mobile trên iPhone 4 chỉ đăng nhập 1 lần, lần thứ 2 là chết, tìm mãi mới thấy thằng này.

$.ajax({
    type: 'POST',
    headers : { "cache-control": "no-cache" },
    url : ,
    data:,
    dataType : 'json',
    success : function(responseText) {…}

Đã giải quyết được, đăng nhập ngon luôn.

Tham khảo:
http://stackoverflow.com/questions/12506897/is-safari-on-ios-6-caching-ajax-results

Safari in iPhone with submithandler

1. http://stackoverflow.com/questions/11835286/android-jquery-show-not-working-in-submit-handler

2. http://stackoverflow.com/questions/4131056/why-does-this-work-in-firefox-but-not-in-safari

3. http://stackoverflow.com/questions/8026956/jquery-in-iphone

4.http://www.experts-exchange.com/Software/Internet_Email/Web_Browsers/Q_26852032.html

5.http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Jquery/Q_27733014.html

Download Template HTML từ Themeforest

1. http://www.filestube.com/search.html?q=themeforest+metro+ui&select=All

2. http://themes.webmandesign.eu/jazzmaster/portfolio/portfolio-5-cols/ (Màu sắc cũng được)

Tham khảo cho phần Print báo cáo

http://etimbo.github.com/jquery-print-preview-plugin/example/index.html
http://www.techtricky.com/jquery-template-plugin/
http://tablesorter.com/docs/
http://www.chromaloop.com/posts/chromatable-jquery-plugin
http://dotnetslackers.com/articles/ajax/Using-jQuery-with-ASP-NET.aspx
http://weblogs.asp.net/scottgu/archive/2010/05/07/jquery-templates-and-data-linking-and-microsoft-contributing-to-jquery.aspx
http://www.codeproject.com/Articles/165410/ASP-NET-MVC-Editable-DataTable-jQuery-DataTables-a
http://www.codeproject.com/Articles/189621/Creating-an-expandable-master-details-table-jQuery
http://blueorbitsoftware.com/blog/?p=78
http://info.titodotnet.com/2011/08/aspnet-mvc-3-and-jquery-templates-part1.html

jquery autocomplete minlength:0

Khi user muốn focus vào TextBox mà hiện luôn danh sách hỗ trợ thì dùng thằng này là ngon:

http://stackoverflow.com/questions/4604216/jquery-ui-autocomplete-minlength0-issue

Demo: http://jsfiddle.net/ricardolohmann/SdLaP/


$('#txtSearchVehicleInterest').autocomplete({
autoFocus: false,
minLength: 0,
mustMatch: false,
source: function (request, response) {
response($.ui.autocomplete.filter(
mgrVehiclePlate.keys(), request.term));
},
focus: function (event, ui) {
return false;
},
select: function (event, ui) {
$('#txtSearchVehicleInterest').val(ui.item.label);
var vehicleID = mgrVehiclePlate.get(ui.item.label);
if (vehicleID > 0) {
_online.panTo(vehicleID)
}
addVehicleInterest(ui.item.label);
return false;
}
}).focus(function (e) {
if (!e.isTrigger) {
$(this).autocomplete("search", "");
}
return false;
}).data("autocomplete")._renderItem = function (ul, item) {
var re = new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + this.term + ")(?![^<>]*>)(?![^&;]+;)", "gi");
var t = item.label.replace(re, "$1");
return $("
")
.data("item.autocomplete", item)
.append("" + t + "")
.appendTo(ul);
};

Marker Manager in Google map v3

1. http://google-maps-utility-library-v3.googlecode.com/svn/tags/markermanager/1.0/docs/reference.html

2.http://google-maps-utility-library-v3.googlecode.com/svn/tags/markermanager/1.0/docs/examples.html

3. http://code.google.com/p/google-maps-utility-library-v3/source/browse/tags/markermanager/0.1/src/markermanager.js?r=31

4.http://stackoverflow.com/questions/6174934/google-maps-v3-marker-manager

5.http://stackoverflow.com/questions/7819209/google-map-marker-manager-v3

6. https://developers.google.com/maps/articles/toomanymarkers

 

Fix bug icon xe bị lệch đường trên google map v3

-> Trước mình dùng thằng này để tạo icon trên map thì icon luôn bị lệch 1 khoảng so với đường -> Comment nhiều
var marker_img = new google.maps.MarkerImage(icon_path, null, null, null, new google.maps.Size(32, 32));
 -> Sau khi tìm kiếm 1 hồi thì chuyển sang đoạn sau thì chạy ngon hơn.
var marker_img = new google.maps.MarkerImage(icon_path, new google.maps.Size(32, 32), null, new google.maps.Point(16, 16), new google.maps.Size(32, 32));

Test sự kiện (Events) trên google map v3

1. http://gmaps-samples-v3.googlecode.com/svn/trunk/map_events/map_events.html