Thursday, July 24, 2008

jQuery - Thickbox

Conditional statement for IE6

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

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

Track mouse with jQuery


    $('p').html("X Axis : " + e.pageX + " | Y Axis " + e.pageY);



Saturday, July 19, 2008

ASP.NET: Retrieve data from a web page


ASP.NET: Custom Error Pages


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()

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



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.

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


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

window.parent._javaScriptVar = "someValue";



Jump between braces in Visual Studio

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