Thursday, July 24, 2008

jQuery - Thickbox

http://jquery.com/demo/thickbox/

http://blogs.digitss.com/javascript/hacking-jquery-thickbox/

Conditional statement for IE6

<!--[if lt IE 7]>
  <link rel="stylesheet" type="text/css" media="screen" href="other.css" />
<![endif]-->

lt - means "less then" - will link another css only for browsers less then IE7

Track mouse with jQuery

 

$(document).ready(function()
 {
  $().mousemove(function(e)
   {
    $('p').html("X Axis : " + e.pageX + " | Y Axis " + e.pageY);
  });
});

 

Source

Saturday, July 19, 2008

ASP.NET: Retrieve data from a web page

Link

ASP.NET: Custom Error Pages

Link

ASP.NET: Extract data from a SQLDataSource to a DataTable

 

1. Dim dv As New System.Data.DataView  
2. Dim dt As New System.Data.DataTable  
3. dv = mySQLDataSource.Select(DataSourceSelectArguments.Empty)  
4. dt = dv.ToTable()
Source

ASP.NET: Use C Sharp and VB.NET in the same project

 

Link

Persisting data in a web app by using frames

 

Say you have your main page, which is just a frameset. All the navigation occurs within that frameset, such that going from page1 to page2 merely updates the frame's url, it doesn't re-create the host page. This leaves the host page intact, including it's JavaScript state. Therefore, you could have a JavaScript variable persist data between pages.

<html>
  <head>
    <title>My App</title>
    <script language="javascript" type="text/javascript">
      var _javaScriptVar = null;
    </script>
  </head>
  <frameset>
      <frame src="Page1.aspx" id="mainFrame">
  </frameset>
</html>

 

You could then reference this variable from your child pages via the DOM:

window.parent._javaScriptVar = "someValue";

 

Source

Jump between braces in Visual Studio

Put your cursor before or after the brace (your choice) and then press Ctrl+].

Source