Thursday, May 3, 2007

how to take a thumnail of a website with asp.net 2.0

Have you visited http://www.snap.com
It is a search engine with the snaps(thumbnail of the sites). It is a very unique .
As .NET Developer we all like to find the way how we can take real time thumbnails of the website. I have searched a lot and i have found a great article on this.

here is the link....
http://www.codeproject.com/useritems/website_screenshot.asp
Share:

Comparision of Ajax Framework for ASP.NET 1.1

I have found a great article which compare a lot of framework in for Ajax .
It includes following frameworks.

Frameworks included in comparison are:
  • ComfortASP.NET V0.65 (beta)
  • MagicAJAX.NET V0.3.0
  • ZumiPage V2.10
  • ATLAS CTP July 2006
  • OutPost V1.4
  • FastPage V2.0
  • Telerik r.a.d. ajax V1.03 (+Hotfix)
  • Anthem Panel V1.3.
It compares on the following basis...

  • General
  • Integration
  • General ASP.NET Compatibility
  • ASP.NET 2.0 compatibility
  • Features
  • Ajax post backs
  • Additional Feature.

here is the link of article....
Share:
Thursday, April 26, 2007

Get selected node from IE web controlTreeview WebControl-ASP.NET

I have search lots of pages for this but i have not found then i have tried lots of way then after that i found this amazing code.

It is very easy and simple....

tv.GetNodeFromIndex(tv.SelectedNodeIndex).Text.ToString()

here tv is name of the tree view

Share:

Bulk insert with dynamic primary key -SQL Server 2000/2005

You often need a bulk insert with dynamic primary key where you can define your keys without getting it from the .txt files or .csv files.

here are the stored procedure to bulk insert country with dynamic primary key.

first create temp.txt file in c drive with following data.

Australia
Canada
America
India

then create table with following fields

countryid int 4
countryname varchar(100)

and assign name as tblCountryMaster

now use following stored procedure


SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO

CREATE PROCEDURE sp_BulkInsertCountry
(
@FilePath varchar(1000)
)
AS
BEGIN--PROCEDURE
--variable declaration
declare @SQL varchar(500)
declare @id int
declare @CountryName varchar(30)


--Create temporary table for Country
CREATE TABLE #tmpCountry
(
CountryName varchar(30),
)

---executing bulk insert on temporary table
SET @SQL='BULK INSERT #tmpCountry from ''' + @FilePath + ''' WITH (FIELDTERMINATOR ='','',ROWTERMINATOR=''\n'')'
EXEC(@sql)

DECLARE cursor_Country CURSOR READ_ONLY FOR
select [CountryName] from #tmpCountry

OPEN cursor_Country
FETCH NEXT FROM cursor_Country INTO @CountryName
WHILE @@FETCH_STATUS=0
BEGIN
SELECT @id=isnull(max(Countryid),0) from tblCountryMaster
SET @id=@id+1
INSERT INTO tblCountryMaster values(@Id,@CountryName)
FETCH NEXT FROM cursor_Country INTO @CountryName
END
CLOSE cursor_Country
DEALLOCATE cursor_Country
END--PROCEDURE


GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO

happy programming
Share:
Wednesday, April 25, 2007

How to create search engine in ASP.NET Search PDF,HTML,

I have found a great article to create search engine in asp.net. It describes every aspect of search engine and also explain how to build search engine. It not only searches html it also searches pdf files, word,power point files and other things.

here is the link for that article...
Share:

Saving line break in multiline textbox ASP.NET 1.1

Many time it happens with the multi line text box that it does not save the line break and another things in the text box. I have found a great way to do this..

You can replace the line break with the string replace function for example your text box name

if you want to assign text box to a some value...
txtAddress.Text=objAddress.CompanyAddress.Replace("put here br","\r\n");

if you want to assign text box value to another object
txtAddress.Text=objAddress.CompanyAddress.Replace("put here br","\r\n");

happy programming...
Share:

applying CSS in multiline textbox of asp.net

I have seen many time whenever we try to apply css classes to the the multi line text of asp.net. It does not work.

It may happened due to the browser treat that text box as the text area. So you can do it with defining text area element in css and it will automatically apply to the multi line text box.

For example.
text area
{
border:#CCCCCC 1px solid;
font-size:10px;
vertical-align:middle;
}

If still it is not working that you can set directly attributes with property such as font,font size etc.
Share:
Tuesday, April 24, 2007

Mouse Over -Mouse Out effect in gridview of asp.net

I have found to great article to give mouse hover and mouse out effect on grid view.

here is the link to this articles
Share:

ASP.NET WEB IE CONTORLS TAB STRIP,TREE VIEW FOR asp.net 1.1

We often need to create tree view and tab strip controls in web application. Microsoft is not providing all the control with the .NET Framework. So we have to create it own or we have to third party controls. But, I have found a great controls developed by msdn people which contains tab strip,tree view, multi page controls.

here is the link to download controls...
Share:
Wednesday, April 18, 2007

53 CSS-Techniques You Couldn’t Live Without

Cascading Style sheet are used by more and more web developers today. CSS has many advantages over the simple html. It is compact and can be used as general resource for all the web pages.

I have found a great article which has 53 ideas for CSS and you can't ignore them. Let’s take a look at 53 CSS-based techniques you should always have ready to hand if you develop web-sites.

here is the link:
http://www.smashingmagazine.com/2007/01/19/53-css-techniques-you-couldnt-live-without/
Share:

Free xhtml templates

Xhtml is now becoming the defacto standard for the web application. It has more advantage over the simple html.

I have found the cool link to download professional templates which is absoultely free.
here is the link...
http://www.templateworld.com/free_templates.htmll
Share:
Tuesday, April 17, 2007

Formating date in asp.net1.1 datagrid.

Some time we need to display the dates in data grid. And we have to format it as per the requirement.

here is the way to format link in the data grid.

First Select data grid and open property window by pressing f4. Then go to the.
Click on the property builder then click the columns and select the column which you
want to display in date format.

Then go to the data formating expression text box and paste the following code.
{0:dd/MM/yyyy}

compile the application and now data will be display in dd/MM/yyyy format.

Here you can specify any valid format for date.
Share:

How to market your blog

A blog is a great platform to give your opinion and discuss your life with others. If you are a great blogger and you are writing posts about everything but nobody is visiting your blog then it is worthless. So you have to market your blog.

There is lots of way to market your blog. I have found a great link for marketing your blog.

here is the link:
http://www.problogger.net/archives/2007/01/11/how-to-market-your-blog-in-2007/
Share:

Microsoft Anti-Cross Site Scripting Library version 1.5

Microsoft has launched anti scripting library to secure your website from cross scripting.

The Anti-Cross Site Scripting Library can be used to provide a high degree of protection to Web-based applications against Cross-Site Scripting (XSS) attacks.


http://www.microsoft.com/downloads/details.aspx?familyid=efb9c819-53ff-4f82-bfaf-e11625130c25&displaylang=en
Share:

How hackers hack the ajax enabled site. + Stop Hacking

Have you ever think about the securing your ajax enabled websites? Hacker use XSS vulnerabilities to hack this kind of site.

I have found great link that deeply discuss the this XSS vulnerabilities. Mike Ormond has deeply explained about stopping hackers to hack your asp.net Ajax enabled website.

here is the link

http://blogs.msdn.com/mikeormond/archive/2007/04/04/hacking-ajax-applications.aspx
Share:
Friday, April 13, 2007

ASP.NET 1.1-Document Outline Window

If you are using visual studio.net 2003 and you are finding some html code or you want to see the html code for the particular source then document outline window will help you.

It provides the complete tree structure of a html code. So you can easily navigate through it and by selecting particular node will directly moves cursor to that control related code in html pane.

It is a very useful tool navigate between elements of a page or control.

You can see this windows by pressing Ctrl+Alt+ T or you can go through view->Other window -> Document Outline

Here is the screen shot for document outline window.

Share:

Ajax control toolkit for ASP.NET 1.1,2.0 -ANTHEM.NET

There are lots of Ajax enable toolkit available to asp.net 2.0 but i have found another one Ajax enable toolkit. It is Jason Diamond's MyAjax.net which has recently been redesigned and launched on SourceForge.Net as Anthem.NET.


Anthem.net is so easy to use and contain almost all the controls are Ajax Enabled.It supports view state, so you can get control states and page info back in callbacks. It works seamlessly with web user controls, and master pages; and having used it on a live application, I can say it's reasonably stable. Best of all, you won't need to write any JavaScript (or XML script).

You can found more details for anthem.net from following links.

http://www.codeproject.com/Ajax/AnthemNET.asp

http://anthem-dot-net.sourceforge.net/

http://anthem-dot-net.sourceforge.net/docs/

http://anthem.talloaksoftware.com/
Share:

ASP.NET ACESS KEY PROPERTY-SHORT KEY FOR FOCUS

In the desktop windows application. You can easily create short key which moves current cursor to a particular control. Now with ASP.NET Access key property you can also create short key in
web application.

For example you have a text box called txtName write name of the candidate. So go the property window by pressing f4. And goto access key property and write N . That's it you have created a short cut key for the that text box.

Compile the source and code and view the page in a browser. Now you can set focus on txtname text box via pressing ALT+N.

Happy Programming....




Share:
Friday, April 6, 2007

Codeplex- Open Souce Project Hosting for microsoft

CodePlex is Microsoft's open source project hosting web site. You can use CodePlex to create new projects to share with the world, join others who have already started their own projects, or use the applications on this site and provide feedback.

People can host their project with registration.

here is the link ....

http://www.codeplex.com
Share:

Hot keys in ASP.NET Page

Shortcut key is esesntial features in the desktop applicaitons. Without shortkey we cant even think of desktop application.

Have you think of a shortkey in web application. Yes, it is possible to define the shortcut key for a button. (I am not kidding). I have found a very good article on how to define hotkeys with the help of javascript by M. Vadivel.

He has explained a great way to define hotkey on a page that will trigger a action when this hotkeys are pressed such as ALT + S.

here is the link for that article...

http://www.15seconds.com/howto/pg000086.htm
Share:

Microsoft ASP.NET 1.1 Starter Kits...

ASP.NET 2.0 is one of the most hottest plateform in the web developement but still lots of people are using asp.net 1.1 and it is quite popular among the developers.

Those who want to learn asp.net the asp.net 1.0/1.1 are first step.

Here are the some start kits provided by microsoft for asp.net 1.1. It still available

here is the link...
http://www.asp.net/downloads/default11.aspx?tabid=62
Share:
Tuesday, April 3, 2007

Microsoft Automotive- A Fremework and Plateform for Automotive Industries

Microsoft Automotive is one of the greatest step of microsoft towards the automobile industries..

Microsoft works in collaboration with its innovative partners to deliver comprehensive value and new capabilities to the automotive industry, providing insight and innovation for the creation, marketing, and enjoyment of the automobile.

Micorsoft has also created microsoft automative & industrial solutions group to accelerate developement in automotive industries using microsoft technologies.

For more details read following link:

Microsoft Automotive
Share:
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 asp.net can cache categoryid parameter of get and post method.

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

You can also cache whole control in asp.net 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:


' In VB.NET
Cache("name") = value


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


to get value

'IN VB.NET
value = Cache("name")

- or -

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


That's all..
Happy Programming....
Share:

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...

http://webaccelerator.google.com/
Share:
Thursday, March 29, 2007

Building Layered Application with ASP.NET 2.0

There are lots of discussion about building layered application with asp.net 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 asp.net 2.0.

here is the link for that article...
http://imar.spaanjaars.com/QuickDocId.aspx?quickdoc=416
Share:

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...
http://www.marketleap.com/publinkpop/

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..
http://www.marketleap.com/siteindex/default.htm

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...

http://www.marketleap.com/verify/default.htm

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...

http://www.reactionengine.com/
Share:
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...

http://en.csharp-online.net/Tool%2C_Menu%2C_and_Status_Strips
Share:

Write better window application

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

http://www.ssw.com.au/ssw/Standards/Rules/RulesToBetterWindowsForms.aspx
Share:

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.....

http://www.akadia.com/services/dotnet_databinding.html
Share:

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:
http://www.15seconds.com/issue/040210.htm
Share:

Increase your windows forms application performance

With microsoft.net 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:

http://msdn.microsoft.com/msdnmag/issues/06/03/windowsformsperformance/default.aspx
Share:

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:

http://www.hubspot.com/MarketingTips//tabid/8625/Default.aspx
Share:

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:

http://msdn2.microsoft.com/en-us/library/4dtdybt8(vs.80).aspx
Share:
Friday, March 23, 2007

Brainbench ASP.NET Certification


Yester I have received brainbench certification
People can find my live transcript from following

http://www.brainbench.com/transcript.jsp?pid=6684815
Share:
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.

http://www.irritatedvowel.com/Programming/Standards.aspx
Share:

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 ...
http://msdn.microsoft.com/msdnmag/issues/04/04/XMLFiles/
Share:

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 vb.net or c#.

here is exmple of it.


set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go


CREATE PROCEDURE [dbo].[sp_InsertState]
@StateId int,
@Name varchar(30)
AS
BEGIN
declare @Error Int
declare @TableName sysname
declare @ErrorMessage nvarchar(2000)
BEGIN TRY
BEGIN TRANSACTION
SET NOCOUNT ON;
INSERT INTO tbl_State_Master
(stateid, name, isactive)
VALUES (@StateId,@Name,1)
SET NOCOUNT OFF;
COMMIT TRANSACTION;
END TRY
BEGIN CATCH
ROLLBACK TRANSACTION
set @ErrorMessage=ERROR_MESSAGE()
RAISERROR('State can not be inserted',16,1)
END CATCH
END
Share:

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