Friday, March 30, 2007

ASP.NET Caching

Caching is process of saving html and data in browser cache. Some data are difficult to obatin it assumes lot of resouceof the server. The best way to store it in cache. So we can retrive from cache instead doing round trip to the server.There are also some portion of the site does not change frequently so caching is a good idea to store this portion ofwebsite in cahce rather then loadind it from server.

ASP.NET also provide caching features.ASP.NET Caching API provides great features for caching.ASP.NET provide three types of caching.

1) Page Output Caching
2) Page Fragment Caching
3) Data Caching

1) Page Output Caching:

In ASP.NET you can do page output caching with output directive....
Here is the code for output caching

<%@ OutputCache Duration="120" VaryByParam="none"%>

This means that page will cache for 120 second and during that time page will not change with get or post parameters.After 120 second page cache will be flush and then page content can be change by get or post parameters.

2) Page Fragment Caching:

We all know that it is impratical to cache whole page of website. So it is better cache a portion of a website thenwhole page. ASP.NET caching API also provide that feature.

From Following code can cache categoryid parameter of get and post method.

<%@ OutputCache Duration="120" VaryByParam="CategoryID"%>

You can also cache whole control in which can be used as portion of parameter.

<%@ OutputCache Duration="120" VaryByParam="none" VaryByControl="ViewCategory" %>

This will cache whole user control called viewcategory.

3) Data Caching:
For that ASP.NET Caching API provides two classes in System.Web.Cache name space.The first class, Cache, is the classwill be using to add and remove items from the data cache. The second class, CacheDependency,is used when assigning a cache dependency to an item in the data cache.

To add an item to the cache you can simply do:

Cache("name") = value

// In C#
Cache["name"] = value;

to get value

value = Cache("name")

- or -

//IN C#
value = Cache.Get("name")

That's all..
Happy Programming....

Make Internet Explorer 6.0 as fast as firefox or IE 7.0

Google has done amazing thing with the speed of browser. Google has provided a software that will increase your browser speed almost 1.5 times.

It works with all browser and It saves lot of minutes of browsing..

here is the link to download that software...
Thursday, March 29, 2007

Building Layered Application with ASP.NET 2.0

There are lots of discussion about building layered application with 2.0. As we all know this can be done in many way. I have found one interesting article on this.

It covers all the aspects of building layered web application using 2.0.

here is the link for that article...

Search Engine Optimization tools

Search Engine Optmization is one of the hottest things in this days. I have found great tool that will help you to opmize your sites.

First one is market leap which contains three tools
1) Link popularity tool

Link popularity check is one of the best ways to quantifiably and independently measure your website's online awareness and overall visibility. Simply put, link popularity refers to the total number of links or "votes" that a search engine has found for your website.

here is link for this tool...

2) Search Engine saturation

Search Engine Saturation simply refers to the number of pages a given search engine has in its index for your website domain. Not all search engines report this information but enough of them do to create some meaningful benchmarks for your search engine marketing campaigns.

here is the link for this tool..

3) Keyword Verification.

Key word verification tool checks to see if your site is in the top three pages of a search engine result for a specific keyword. It's important to be in the top 3 pages of a search result because most people using search engines don't go past the 3rd page.

here is the link for this tool...

second tool is reaction engine...

It is a great tool for seo optimization in your site. It will analyze site on the keypharses and then generate report based on this.

Report will conver following topics..
1) Download Time
2) Parent Time
3) Hosting Information
4) HTTP Headers
5) Html validation
6) Title and metatag
7) Meta data
8) Text view-only text view of your site.
9) Link on site.
10) Keyword density.

here is the link for that tool...
Wednesday, March 28, 2007

Tool, Menu, and Status Strips

Windows Forms 2.0 have great control in their stack. ToolStrip and MenuStrip are great example of it. It is a great new control which you can use with application to developer better user interface.

I have found an article on both controls. It describes all the things that realted with toolstrip and menustrip. It also teaches how to another control in toolstrip. It also specifies how to customize the tool strip and menustrip control as per our need.

Here is the link for atricle...

Write better window application

here is the another link for writing better windows application...

Databinding in .NET Applications

Data binding provides a way for developers to create a read/write link between the controls on a form and the data in their application (their data model). There are several ways to bind datasource with controls i have found very inersting link that covers all the aspects of databinding..

here is the link.....

Creating Collections for Data Binding and Serialization

Collection are faster then the any datasource like dataset, data reader. So it must be used to bind control in application rather then other datasources. I have found very ineresting article series written by Thiru Thangarathinam which discusss how to create collection and how to bind it with controls.

here is the link:

Increase your windows forms application performance

With technology and windows forms 2.0 you can build great application. It provides great user interface component so you can develope very reach applications.

There are two aspects of application design and another one is performance. If any of this two is not perfect then your application may lead to a failure.

I have found one interesting link that discuss about this issues. It discuss all aspects realted to design and performance. It discuss about common performance-critical scenarios such as startup, control population, and control painting to boost your application performance and make it user responsive.

here is the link:

Search Engine Optimization tool

Search Engine marketing is one of the most important aspect of site popularity. We must have have to consider when we are developing a website. Today most of thing are find by the search engine so if you want to increase your popularity and visitor you must to search engine optimization.

Keyword is the most import in search engine optimization. You must put right keyword to increase your site popularity among search engine. I have found a link that help us in great way to create search engine keywords.

It contains many links to search engine tools and also help us to understand what is search engine optimization all about?

here is the link:

Writing Quality code.

As a developer we all write programing code to devleope applicaitons. But it is very important how you write them.
There are several method we have to follow when writing code.
I have found very inseresting link which discuss every section of code.

here is the link:
Friday, March 23, 2007

Brainbench ASP.NET Certification

Yester I have received brainbench certification
People can find my live transcript from following
Thursday, March 8, 2007

C#.NET Coding Industry Standards.

Lots of people are creating and devleoping the application using Microsoft.NET plateform but still don't know the right way to code it. Here is the link for .NET Coding Standards that a developer must following while developing application.

What is Blog & RSS

Lots of people don't know about blog and rss. I have found a great atricle in msdn which is explaining all aspects of the Blog and RSS.

Here is the link ...

TRY-CATCH Block-SQL Server

In SQL server 2000, to handle sql server exception we have to use goto statement while in the sql server 2005 support the try-catch type of exception handling just like or c#.

here is exmple of it.


CREATE PROCEDURE [dbo].[sp_InsertState]
@StateId int,
@Name varchar(30)
declare @Error Int
declare @TableName sysname
declare @ErrorMessage nvarchar(2000)
INSERT INTO tbl_State_Master
(stateid, name, isactive)
VALUES (@StateId,@Name,1)
set @ErrorMessage=ERROR_MESSAGE()
RAISERROR('State can not be inserted',16,1)

Proctect your blog content

I have found great site which will list the users who are using content without your site.
So you can protect your blog content.

here is the link ....
Friday, March 2, 2007

Spalsh Screen -C#

It is a good idea to create splash screen when you loading data on the main form. So splash screen resides till the data loaded on the screen.

Fist design a form then set formborderstyle property to "SizableToolWindow"
set ControlBox Property to "False"
set StartPosition Property to "CenterScreen"
set WindowState Property to "Normal"

Import following name space with using directive

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

then write following code on the your main forms load event

FrmSplash frm = new FrmSplash();

////do your work here you can put your code to load data

Indian Buget Effects on the Technology

The Indian Finance Minister has presented a financial budget for year 2007-2008. The FM has put a 12% met tax on softwares.

I have found a very ineresting site where we can found whole effects of budgets on technology .
here is the link

Enterprise Resource Planning....

Our company have decided to develope a Enterprise Resource Planning System. We are new to this.So please put us some comments how we should start and how we develope this erp system.
You can put your comments at my blog Jalpesh or Sameer.

I am eagarly waiting my users Comments.

Have a nice time....
Thursday, March 1, 2007

Stored Procedure-Importing CSV Files into Table -SQL Server

Here is the Stored Procedure code for importing comma seperated CSV files to table.

CREATE PROCEDURE [dbo].[sp_ImportScript]
@filepath varchar(2000)
declare @tmpsql varchar(3000)
set @tmpsql='BULK INSERT table'
set @tmpsql=@tmpsql + ' FROM ''' + @filepath + ''''
set @tmpsql=@tmpsql + ' WITH (FIRSTROW=2,FIELDTERMINATOR ='
set @tmpsql=@tmpsql + ''','''
set @tmpsql=@tmpsql + ',ROWTERMINATOR ='
set @tmpsql=@tmpsql + ''','''
set @tmpsql=@tmpsql + ')'
select @@rowcount
DECLARE @ErrMsg nvarchar(4000), @ErrSeverity int
@ErrSeverity = ERROR_SEVERITY()
RAISERROR(@ErrMsg, @ErrSeverity, 1)

How to set default value of a property in Class-C# 2.0

If you wanna set properties default value at the time of Class Instance creationg here is code that.

Import following name space to your class with using directives.

using System.Collections.Generic;
using System.Text;
using System.ComponentModel;

Then create a private variable field for property

private string _message;

Finally here is code that generate default value with property.

[DefaultValue("This is default value of message")] //this code generates default value
public string Message
        return _message;
        _message = value;

Note: You can create a DefaultValueAttribute with any value. A member's default value is typically its initial value. A visual designer can use the default value to reset the member's value. Code generators can use the default values also to determine whether code should be generated for the member.

For more reference see following link -

Meta Tag Extractor

For Search engine optimization Meta Tag is very much important to rank your site within the search engine.

A SEO person always require meta tag extractor to get meta tags from vairous sites and find best keywords that match your site.

I have found a great meta tag extractor here is a link :

Microsoft India Blogstar Content Winners

Microsoft India has conducted Microsoft India Blogstar Contest to encourage Microsoft technology related blogger.

The winners have a chance to meet Steve Balmer -CEO Microsoft Corporation.The winners are announced.

Here is the link:

Filling typed dataset with enterprise libary 2006-C#

Here is the code filling data with enterprise library.

First Create a Type dataset in the visual studio dataset called 'crystal'.
Then create a data table via right click add datatable called script.create
columns you require.

and then first import following name space using directives.

using Microsoft.Practices.EnterpriseLibrary.Data;
using Microsoft.Practices.EnterpriseLibrary;
using System.Data;
using System.Data.Common;

Database db = DatabaseFactory.CreateDatabase("StockConnectionString");
private string _CommandName;
_CommandName = "sp_LoadScript";
DbCommand dbCommand = db.GetStoredProcCommand(_CommandName);
db.AddInParameter(dbCommand, "Name", DbType.String, "abc");
db.LoadDataSet(dbCommand, Crystal, "script");

here sp_Loadscript is a sql server 2005 stored procedure which load

Starting PageCounter to Specific Value in ASP

Here is a code that start value to a specific value.
In the code i have started its value from 10000

Dim objPageCount
Set objPageCount = Server.CreateObject("MSWC.PageCounter")

dim hit
hit=objPageCount.Hits()+ 10000
Response.Write "Site Visitors: " & hit & ""

Happy Programming

Tired of Finding Jobs- Don't Give Up

If you are finding jobs for a long time and you are not getting interview calls from companies then just don't give up just keep trying. Here is a post for you that will inspire you on this.

Support this blog-Buy me a coffee

Buy me a coffeeBuy me a coffee
Search This Blog
Subscribe to my blog


My Mvp Profile
Follow us on facebook
Blog Archive
Total Pageviews