Saturday, March 26, 2011

How to use cufon.replace inside UpdatePanel?


Place below code inside Update Panel 
 
<script type="text/javascript" language="javascript">
  Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
  function EndRequestHandler(sender, args)
  {
   Cufon.replace('h1');
   Cufon.now();  
 }
<script>

Saturday, March 12, 2011

how can I jump to the top of page using UpdatePanel?


<script type="text/javascript" language="javascript">
  Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
  function EndRequestHandler(sender, args)
  {
  scrollTo(0,0);
  }
<script>

Monday, March 7, 2011

Difference between JOIN and INNER JOIN

SELECT * FROM table JOIN otherTable ON table.ID = otherTable.FK

OR

SELECT * FROM table INNER JOIN otherTable ON table.ID = otherTable.FK

They function the same. INNER JOIN can be a bit more clear to read, especially if your query has other join types (e.g. LEFT or RIGHT) included in it.

Similarly with OUTER JOINs the word "OUTER" is optional, its the LEFT or RIGHT keyword that makes the JOIN an "OUTER" JOIN.

However for some reason I always use "OUTER" as in LEFT OUTER JOIN and never LEFT JOIN, but I never use INNER JOIN but rather I just use "JOIN"