Friday, December 15, 2006

Mantis : Free Web-Based BugTracking System

Mantis is a free popular web-based bugtracking system (feature list). It is written in the PHP scripting language and works with MySQL, MS SQL, and PostgreSQL databases and a webserver. Mantis has been installed on Windows, Linux, Mac OS, OS/2, and others. Almost any web browser should be able to function as a client. It is released under the terms of the GNU General Public License (GPL).

http://www.mantisbugtracker.com/

Tuesday, December 12, 2006

Messenger

While browsing i come across a very good messenger log listner, this would be of interest to many of programmers who want to implement their own messenger.

Check it out for more.
http://www.codeproject.com/csharp/MsnMessengerLogListener.asp

Sunday, December 10, 2006

DataBinder.Eval() Method

DataBinder.Eval() Method

DataBinder.Eval() method saves you from writing complex expressions.

For example, make your datagrid column to template field.

Now, lets understand it various use with different example.


Example1: Concat two datagrid column into one.

In .ASPX File
asp:TemplateColumn HeaderText="Address"
ItemTemplate
asp:Label id="Label1" runat="server" Text='%#

ConcatColumns(DataBinder.Eval(Container.DataItem,"City"),DataBinder.Eval(Container.DataItem,

"Country")) %'lblAddress/asp:Label
/ItemTemplate
/asp:TemplateColumn

In .CS File
public static string ConcatColumns(object objText1, object objText2)
{
return objText1.ToString() + " " + objText2.ToString();
}



Example2: Opening a default Email Program on clicking datagrid column.

In .ASPX File
asp:TemplateColumn HeaderText="ContactName"
ItemTemplate
asp:Label id="Label2" runat="server" Text='%#

GetEmailLink(DataBinder.Eval(Container.DataItem,"ContactName"),DataBinder.Eval(Container.Dat

aItem,"Email")) %'lblCompanyName/asp:Label
/ItemTemplate
/asp:TemplateColumn

In .CS File
public static string GetEmailLink(object DisplayText,object EmailAddress)
{
return "a href='mailto:" + EmailAddress.ToString() + "'" + DisplayText.ToString() +

"/a";
}





Example3: Opening a Pop-up Link on clicking datagrid column.

In .ASPX File
asp:TemplateColumn HeaderText="Contact"
ItemTemplate
asp:Label id="Label2" runat="server" Text='%#

OpenPopupLink(DataBinder.Eval(Container.DataItem,"ContactName"),DataBinder.Eval(Container.Da

taItem,"CustomerId")) %'lblContactName/asp:Label
/ItemTemplate
/asp:TemplateColumn

In .CS File
public static string OpenPopupLink(object displayText,object displayId)
{
return "a href='http:Webform2.aspx?NameField=" + displayId.ToString() + "'" +

displayText.ToString() + "/a";
}





Example4: Displaying no. of characters to be displayed for a particular datagrid column.
Here displaying 5 characters.

In .ASPX File
asp:TemplateColumn HeaderText="Address"
ItemTemplate
asp:Label id="Label1" runat="server" Text='%#

GetFormatedText(ConcatColumns(DataBinder.Eval(Container.DataItem,"City"),DataBinder.Eval(Con

tainer.DataItem,"Country")),5) %'lblCompanyName/asp:Label
/ItemTemplate
/asp:TemplateColumn

In .CS File
public static string GetFormatedText(object objText, object objChars)
{
if (objText.ToString().Length int.Parse(objChars.ToString()))
return objText.ToString().Substring(0, int.Parse(objChars.ToString()));
else
return objText.ToString();
}



Example5: Displaying Calculation, Calculating UnitPrice into Quantity and displaying Total

In .ASPX File
asp:TemplateField HeaderText="Total"
EditItemTemplate
asp:TextBox ID="TextBox1" runat="server"/asp:TextBox
/EditItemTemplate
ItemTemplate
asp:Label ID="Label1" runat="server" Text='%#

CalculateTotal(DataBinder.Eval(Container.DataItem,"UnitPrice"),DataBinder.Eval(Container.Dat

aItem,"Quantity")) %'/asp:Label
/ItemTemplate
/asp:TemplateField

In .CS File
public static string CalculateTotal(object UnitPrice, object Quantity)
{
double Total = double.Parse(UnitPrice.ToString()) * long.Parse(Quantity.ToString());
return Total.ToString();
}





Example6: Applying conditional formatting to datagrid cell, assigning different colors to cell depends on its InputValue.

In .ASPX File
asp:TemplateField HeaderText="Total"
EditItemTemplate
asp:TextBox ID="TextBox1" runat="server"/asp:TextBox
/EditItemTemplate
ItemTemplate
asp:Label ID="Label1" runat="server" Text='%#

CalculateTotal(DataBinder.Eval(Container.DataItem,"UnitPrice"),DataBinder.Eval(Container.Dat

aItem,"Quantity")) %' ForeColor='%#

ConditionalFormating(CalculateTotal(DataBinder.Eval(Container.DataItem,"UnitPrice"),DataBind

er.Eval(Container.DataItem,"Quantity"))) %'/asp:Label
/ItemTemplate
/asp:TemplateField

In .CS File
public static Color ConditionalFormating(object Amount)
{
double dAmount = double.Parse(Amount.ToString());
if (dAmount 1000)
{
return Color.Red;
}
else if (dAmount 500)
{
return Color.Blue;
}
else
{
return Color.Green;
}
}



However, using this method does impose a performance penalty on your code because all the work it does is late-bound.

Tuesday, December 05, 2006

The Advantages of Microsoft AJAX

From Joe's Blog

One of the PUMs (Product Unit Manager) in my team, Shanku Niyogi, is an AJAX guru and recently wrote this internally to describe the advantages of Microsoft AJAX.

I thought it was a great write up and I’m reprinting it here with his permission.

There are a wide variety of good AJAX libraries available for ASP.NET today. This shows the demand for AJAX capabilities for the ASP.NET platform.

With ASP.NET AJAX, Microsoft is delivering a high-quality AJAX framework that will be fully integrated into ASP.NET and Visual Studio. We believe that delivering integrated support for AJAX in our platform will have several benefits for ASP.NET developers:

- ASP.NET AJAX will be a completely free release, and will be integrated into the free .NET Framework release in future versions.

- The release version of ASP.NET AJAX, due out around the end of the year, will be fully supported through Microsoft Product Support for the standard (7+3) period. This means that if you have any issues with this product in development or deployment, you can call up Microsoft to get help at anytime. It also means that we will issue hotfixes and service packs.

- ASP.NET AJAX includes integrated authoring support in Visual Studio 2005, and will include even better support in the next version of Visual Studio.

ASP.NET AJAX is also more than just a basic library for incremental rendering. ASP.NET AJAX also provides a rich end-to-end AJAX library that includes a full networking and web services stack, a component model with support for rich interactive behaviors, support for localization and globalization, and other capabilities required for rich web client programming. The client script library for ASP.NET AJAX is available in full source form (debug and release versions), and can be freely modified.

On top of the core package, you can use the ASP.NET AJAX Control Toolkit, which adds a rich library of controls for AJAX development. The Control Toolkit is free and available with a source license that allows full modification and redistribution.

From a pure performance perspective, there are several issues with the assessment that are either inaccurate or that we have improved in the Beta.

1. As Bertrand has mentioned in this comments, doing a pure measurement of script size on a small sample is misleading. The scripts are loaded only once, and then cached on the client. This means that over any real world web site, the cost of downloading the scripts are amortized over the entire site.

2. As Christophe mentioned, the Atlas tests Daniel ran were on the debug version of scripts. In CTP versions of Atlas, this was the default. In the ASP.NET AJAX Beta, scripts are release mode (smaller) and compressed by default. The compressed results are around 14K, which is around the size of an image on the page.

3. We have also done some significant work in reducing packet size for UpdatePanel. In the attached version of the project (which implements the same sample in Daniel’s blog), the packet size of the update is 485 bytes. The UpdatePanel architecture includes features like triggers and conditional updates that allow you to finely customize the update characteristics of your page.

4. ASP.NET AJAX also includes a very rich client-side framework, so that you can build client-centric applications. This goes well beyond basic direct AJAX, with access to server-based web services, a rich client component model, support for localization, and many other features. The client-centric framework requires an approximately 9K subset of the ASP.NET AJAX scripts. A version of the sample written with client-centric techniques (also in the attached project) uses a packet size of approximately 20-30 bytes (depending on the length of the date string).

Some other points in the study that are inaccurate or outdated:

1. In terms of browser support, ASP.NET AJAX supports IE, Firefox/Mozilla, and Safari today, and will support Opera by release. It will also support the next version of IE Mobile.

2. In addition to ASP.NET, ASP.NET AJAX supports other servers such as PHP – so if you have a mixed deployment, you can take advantage of ASP.NET AJAX with these servers as well.

3. The ASP.NET UpdatePanel can automatically detect downlevel browsers that are not AJAX capable, and turns off incremental rendering for the page. This allows you to easily build AJAX-enabled pages that still work on non-AJAX browsers.

Microsoft Expression


Expression Web helps Web developers build sites in compliance with various industry standards, including XHTML and CSS, and for compatibility with specific browsers. Integration with Microsoft's Visual Studio 2005 and ASP.Net 2.0 enable Microsoft-centric development shops to incorporate more advanced functionality.

Monday, December 04, 2006

Monthly Winner @ DotNetSpider.com

Won a Monthly Rap Tier Software @ DotNetSpider.com

Check out my profile @ DotNetSpider.com
http://www.dotnetspider.com/profiles/ViewProfile.aspx?userId=CodeGuruDotNet

Friday, December 01, 2006

Won a 4th Prize Prize @ Community-Credit

Hello Friends,

Again Won a Prize @ Community-Credit

check out url and select "November 2006" from drop-down

I have won 4th Prize : iFish

Most Recent Post

Subscribe Blog via Email

Enter your email address:



Disclaimers:We have tried hard to provide accurate information, as a user, you agree that you bear sole responsibility for your own decisions to use any programs, documents, source code, tips, articles or any other information provided on this Blog.
Page copy protected against web site content infringement by Copyscape