Saturday 18 July, 2009

Source Code Formatter For Blogger , Blogspot , Blog, Blogging, Wordpress & Website

Source Code Beautifier And Formatter For Blogger and Websites, Format Source Code , Format Source code for blog or blogging & website, Online line source code formatter tool, blogger code format tool, Format source code for blogspot,Insert formatted source code

About Code Formatter.

- This source code formatter allow to format code like JavaScript, HTML, CSS, C#, PHP, ASP.net, VB.Net, Visual Basic, DOT.net, ASP & many other languages.

- This does not add unnecessary tags into formatted code, This use only two tag HTML tags & only once with formatted source code.

- This is pure javascript Application so dont worry anyone save your code.

- In the first release we have build it mainly for blogger, wordpress, blog .

- This is compatible with table less layout.

- In the next release we'll make it colorful code formatter tool for your blogger & website.

- Alternative backgrounds used in this tool.


Source Code Formatter..



Friday 17 July, 2009

ASP.NET Website vs Web Application project

Introduction
This post explains about two project types in Visual studio ie Website and Web Application that we use to build the ASP.NET Applications and the fundamental differences between the two project types..
Background
Website project type was introduced in the VS 2005 and Web Application model introduced in VS 2003. Website project type is based on folder structure and does not require a project file. Later in VS 2005 sp1 project file was introduced for the VS 2005 website project type.
Now in VS 2008 we can create both project types.

1.Fundamentally the behavior of the application types is same but website project type is folder based and WebApp is project type like normal project types in VS studio. In WebApplication project type project file defines the structure of the project.
2.WebSite project type contains the folders and anything that you put in the folder are dynamically compiled and be part in the website. More about ASP.NET Website Dynamic compilation here.
3.WebApplication project type contains the designer for the ASPX page and you can find the bin folder which contains the compiled assembly. So First difference can be summarized like ASP.NET website project type is dynamic and WebApp is more like structured. When you add a class file to the website project it will prompt you that it will place the file in App_code folder under root.
4. WebApp project type is restricted to one language where as Website you can add different language files to the App_Code folder which compiles the files dynamically.
5. Referring a user control in WebApp is straight forward.You can define the properties and can be accessed in class files like any other objects where as in website it is not.
6.We can put multiple language files in the Website but those files needs to be in same folder. If you change the location of the file then you need to mention in the Web.Config file as follows.. In compilation process you will have the finer degree of control in WebApp and it is not in Website because everything is dynamically compiled.
7.When you deploy the WebApps you can just copy the Compiled Assembly and Visual elements to the IIS folder where as in Website you need to copy everything to the IIS to work.
8.You can see the following dialogue box when you publish the files in Website If you select the precompiled option then you will find the precompiled folder in the published location there you find the multiple assemblies for each folder in the website.
9. If you use WebApplication project you can not access Profie at design time a workaround solution can be found here.
10. The following link helps you to choose which project type you have to user for the developing web applications.

New version of the ASP.NET AJAX Control toolkit

Latest version of AJAX Control Toolkit V 3.0 includes :


HTMLEditor: The HTMLEditor control allows you to easily create and edit HTML content. You can edit in design mode, as a rich text editor, or in source view to edit the HTML markup directly. HTMLEditor demonstration.


ComboBox: The ComboBox control provides a DropDownList of items, combined with TextBox. Different modes determine the interplay between the text entry and the list of items. ComboBox demonstration.


ColorPicker: The ColorPicker Control Extender can be attached to any ASP.NET TextBox control. It provides client-side color-picking functionality with UI in a popup control. ColorPicker demonstration.

Be sure to also check out the new videos dedicated for these controls and their new tutorials.
There’s also now a new tutorial available on Creating a Custom AJAX Control Toolkit Control Extender.

Many thanks to Alexander Turlov for building this.
Download AJAX Control Toolkit V3.0 to explore more controls

Sunday 5 July, 2009

Find Age from given DateOfBirth using C#

Find Age from given DateOfBirth using C# :

public string FindAge(DateTime dob, DateTime currentDate)

{
int years = currentDate.Year - dob.Year;
int months = 0;
int days = 0;
if(currentDate <>{
--years;
}
dob = dob.AddYears(years);
if (dob.Year == currentDate.Year)
{
months = currentDate.Month - dob.Month;
}
else
{
months = (12 - dob.Month) + currentDate.Month;
}
if(currentDate <>{
--months;
}
dob = dob.AddMonths(months);
days = (currentDate - dob).Days;
return years + " years " + months + " months " + days + " days";
}

Copy the above code in your class...and call the method..enjoy... ;)

Html Fieldset Rounded Corners - Internet Explorer (IE) and Firefox

Html Fieldset Rounded Corners - Internet Explorer (IE) and Firefox

I don't usually prefer anything about Internet Explorer. However, IE's default presentation for the Html fieldset tag just looks nicer. Firefox, on the otherhand, defaults to an ugly square box presentation. So, to try to get Firefox to look more like IE (something I never thought that I would say) ...

  1. fieldset {
  2. -moz-border-radius-bottomleft:7px;
  3. -moz-border-radius-bottomright:7px;
  4. -moz-border-radius-topleft:5px;
  5. -moz-border-radius-topright:7px;
  6. border-radius: 3px;
  7. }