Skip to main content

Posts

Showing posts from 2013

asp.net+Jquery : sort dropdownlist, sort all dropdown in the page

> < head > < meta http-equiv =" content-type " content =" text/html; charset=UTF-8 "> < title > - jsFiddle demo </ title > < script type =' text/javascript ' src =' http://code.jquery.com/jquery-1.8.3.js '> </ script > < style type =' text/css '> </ style > < script type =' text/javascript '> $(function(){ function sortDropDownListByText() { // Loop for each select element on the page. $("select").each(function() { // Keep track of the selected option. var selectedValue = $(this).val(); // Sort all the options by text. I could easily sort these by val. $(this).html($("option", $(this)).sort(function(a, b) { return a.text == b.text ? 0 : a.text < b.text ? -1 : 1 })); // Select one option. $(this).val(selectedValue); })

Amazon AWS - Cloudfront configuration

Amazon Cloudfront Dynamic Content Delivery HTTP GET and HEAD   requests are currently supported by Amazon CloudFront. Over time, we will add support for POST requests.   Our sample setup You can convert your existing blog or setup a new blog from scratch to use cloudfront. For demonstration purpose, I'm going to setup a new blog called www.contentdeliverynetworklog.com and serve the whole blog via cloudfront as follows: Blog domain name:   www.contentdeliverynetworklog.com   (CNAME to cloudfront) Blog origin domain name:   cp.contentdeliverynetworklog.com . To fetch web content from this origin web server. Static asset domain name:   s0.contentdeliverynetworklog.net   (CNAME to cloudfront). Static asset origin domain name:   origin.contentdeliverynetworklog.net . Custom origin IP address for both static/dynamic assets:   75.126.153.203 Caching ruleset for your dynamic and static assets: I am going to use a combination of Batcache+Memcached. However, you can use othe

ASP.NET with C# FedEx Label printout

Refer : http://nicholas.piasecki.name/blog/2009/03/sending-raw-epl2-directly-to-a-zebra-lp2844-via-c/ Send a printer name and value to RawPrinterHelper . SendStringToPrinter ( printerName, sb . ToString ( ) ) ;     I have done simple mistake. My workstation printer shared one.   Wrongly given print name '\\abc-pc\\zebra-520', debug and spend some mins to resolve. correct path is '\\\\abc-pc\\zebra-520'