2014-07-17

Control ID Naming in Content Pages (C#)

http://www.asp.net/web-forms/tutorials/master-pages/control-id-naming-in-content-pages-cs

If you have a container, e.g. a content page in a web form that uses master pages, then your asp server side controls ID do not map into the same html id.


ID="label1" 

not mapped to

id="label1"

instead because of the container content page, it will look like

id="ctl00_MainContent_label1"

So when retrieving the the control, we need to use
label1.ClientID to get the html id

if we need to embed the id within a jQuery selector, we should use some like the following
in the aspx page

$("<%= label1.ClientID %>").



References to the different tags

<% %>  An embedded code block is server code that executes during the page's render phase. The code in the block can execute programming statements and call functions in the current page classhttp://msdn2.microsoft.com/en-gb/library/ms178135(vs.80).aspx
<%= %> most useful for displaying single pieces of informationhttp://msdn2.microsoft.com/en-us/library/6dwsdcf5(VS.71).aspx
<%# %> Data Binding Expression Syntaxhttp://msdn2.microsoft.com/en-us/library/bda9bbfx.aspx

How To Add Google Custom Search Engine in Blogger

http://www.bloggeryard.com/2014/04/google-custom-search-engine-for-blogger.html

Google Custom Search Engine? Tell me a bit more.

Custom Search Engine (CSE) is also a product developed by Google to let sites display the search box for inner site search only. If you run a website that has tons of pages with huge data and its really difficult to set the perfect navigation than you could use search engine that will help your visitors to navigate easily just by searching the thing that they in search box and search box will automatically give them the path of the content that they want. 

2014-07-11

Entity-Attribute-Value (EAV) Model and Product Catalog management

http://en.wikipedia.org/wiki/Entity–attribute–value_model

If you have ever implemented an E-commerce site or any site with a large product catalog, you are likely to have encountered some problems in the database design caused by the large variety in product attributes. A simplistic solution is just to add more columns to take care of different attributes for different products in the Products table. Another schema is using different Product tables for different product groups. However, the code to manipulate different tables then becomes one giant switch case statement, with different cases having different codes for different product tables.

The EAV model is a neat solution that helps to overcome the above problems; albeit with more complex SQL queries. EAV is also known as object–attribute–value modelvertical database model and open schema.

http://www.magentocommerce.com/knowledge-base/entry/magento-for-dev-part-7-advanced-orm-entity-attribute-value

Here is another example taken from the Magento e-commerce software site.
Even for the case of Magento, they have several models instead of using EAV for everything. As I have said before, "Don't use an axe to slaughter a chicken!" There is no need to use EAV if the products catalog can be modelled using a simpler schema.


Github CoPilot Alternatives (VSCode extensions)

https://www.tabnine.com/blog/github-copilot-alternatives/