Storing and Retrieving Objects in Sessions in ASP.Net C#

I had the need to store user form data in a array and then put the array into and arraylist . Now I put the array list into the session and accessed the session object in another page to display the entire contents of the array list.

I had to typecast the session data and get them into an array list.
Now I had code file, filename.aspx.cs which had the class definition, methods ,constructors and the getters,setters.

Will post the code soon.

Is ASP.Net better than PHP ?

I was trying to figure out whether ASP.Net is better than PHP. I have been in PHP for some 2 years now and also tried my hands on ASP. Now trying my hands on Asp.Net

PHP’s OO is not the best even if PHP5 has pretty good OO support.
Found these interesting reads in this regard.
Sitepoint Debate

Sitepoint Top 10 Myths

PHP vs Asp.net Redux

Microsoft Whitepaper

MySQL Indexes

Today I was playing with my pet site FoneArena.com

Was figuring out ways of improving the site. And I had not added some highly accessed columns in a table as Indexes.

So i checked out what diff a query was going to make with and without an Index.

consider this simple query :

[code lang=”sql”]

SELECT Distinct col from table ORDER BY col ASC LIMIT 10

[/code]

The above query took 0.0034 seconds to execute

Now how indexing helped me reduce the query time to 0.0009 seconds.

Can you believe that ?

nearly 400% of time saved just by adding an Index.

Build and Deploy WAR file using Java alone

Today I needed to test a bunch of code which is given here

The article talks about using Dojo and JSON for AJAX applications.

There is a sample application available on the site for the article.Its a zip file when extracted

has the following structure.

  • web
  • actions
    example1.jsp
    example2.jsp
    example3.jsp
    index.jsp
    js
    WEB-INF
    welcome.jsp.html
  • java
  • README.txt
  • build.xml
  • Now i need to build a WAR ( Web Archive ) for deployment on my container – Tomcat.

    Continue reading Build and Deploy WAR file using Java alone