Contents:
Function to get the Ordinal Numbers
public string GetOrdinal(int Number)
{
if (((Number % 100) / 10) != 1)
{
if ((Number % 10) == 1)
return "st";
else if ((Number % 10) == 2)
return "nd";
else if ((Number % 10) == 3)
return "rd";
else
return "th";
}
else
return "th";
}

DotNetNuke Professional and Community Edition
Source -http://www.dotnetnuke.com
Comparison of the Professional and Community Editions
The
DotNetNuke Professional Edition 5.1 is a tested and verified version of
the DotNetNuke framework that meets the requirements of organizations
running business-critical web applications. The Professional Edition
offers the same features as the Community Edition plus some additional
features specifically designed for business-critical applications. The
matrix below indicates the differences between the DotNetNuke Community
and Professional Editions.
For more information, also see:
| Feature |
Community
Edition |
Professional
Edition |
|
Google Analytics Support
Support for injection of analytics tracking code or other content in a specific location of every page
|
 |
 |
|
Google Analytics for Marketing Support
Support for advanced Google Analytics functionality such as visitor
type, landing page, role, or referrer segmentation
|
|
 |
|
Advanced Content Approval Process
Allows administrators to create custom workflows with an unlimited number of states and reviewers
|
|
 |
|
Change Audit
Last modified and full history audit trails
|
 |
 |
|
Granular Permissions
Page, module and folder level extended permissions to provide more granular security rights
|
|
 |
|
Distributed Caching Provider
More efficient resource usage in large web farms
|
|
 |
|
File Integrity Checking
Checks files in the installation and reports any inconsistencies which may impact website reliability
|
|
 |
|
Health Monitoring
Pings the website periodically to identify failures and will notify the
site owner. Also ensures the site stays in web server memory for faster
user accessibility
|
|
 |
|
Vulnerability Database
Maintains a vulnerability database for each product version to easily identify potential issues
|
|
 |
|
Comprehensive documentation and online Knowledge Base that provide guidance for DotNetNuke administrative tasks and answers to common technical questions
|
|
 |

I'm a Microsoft MVP (again!)
friends...
I have been re-awarded with 2009 Microsoft® MVP Award in .NET/ASP.NET Category. This is the second consicutive year as an MVP; and it feels like allmost full moon of my career!!
The mail I received:
Dear Kaushal Parik,
Congratulations! We are pleased to present you with
the 2009 Microsoft® MVP Award! This award is given to exceptional technical
community leaders who actively share their high quality, real world expertise
with others. We appreciate your outstanding contributions in ASP/ASP.NET
technical communities during the past year.
........ long live community :)

TechEd on Road – Ahmedabad (Gujarat - India) June 20, 2009
Hi all …
This time a great news for all the technology enthusiast and want to meet
great peoples in technology and you missed TechEd India 2009 so
you can attend now the same kind of event in Ahmedabad, India on June
20, 2009 Saturday(TechEd on Road) by 1:30 PM.
You will get a chance to meet Two MVP’S here Jacob Sebastian
and Pinal Dave , who presents
numerous technical sessions on SQL Server, Exchange Server 2010, Windows Server
2008 and Virtualization.
Anyone who is interested in technology can attend this event .This is free
event no charges will be taken to attend this event. You can get detailed
information about this event on Pinal’s
Blog and Jacob’s
Blog .
So mark your calendar for this grand event in Ahmedabad here are the details
of this event ::
Location ::
Hotel Rock Regency
C.G. Road
Ahmedabad, India.
Date & Time::
June 20, 2009 Saturday
1:30 PM

are you (MS) certifiable?!
Just check out microsoft.com/areyoucertifiable
a funny dummy test environment who wants to appear and test yourself for ms certification. You can create login or can play as guest, select avtar. There are more than 400 Questions (objective - options to select) with 20 episodes and 5 seasons.
lol.. i loved this :)

Open AJAX Accordion Panes on MouseOver
The default behaviour of AJAX Accordion is: you click on any Accordion pane (say; any control placed in Accorion Pane Header section) cause that pane to Expand and collapse rest of the panes other than the pane which you clicked.
It is also fairly easy to open Accordion Panes when you "MouseOver" on Pane rather than need to click the pane to open it.

All you need to add a JavaScript function to ahieve that and call it or "MouseOver" event of ImageButton / Link / or any submit control which is placed inside Accordion Pane.
You need to add below script in your page:
<script language="javascript">
function Openpane(paneIndex)
{
//MyAccordion is the ID of AJAX Accordion control
var behavior = $get("<%=MyAccordion.ClientID%>").AccordionBehavior;
behavior.set_SelectedIndex(paneIndex);
}
</script>
You need to pass the current Accordion Pane index as asrument of the above script function and call this function on "MouseOver" event as:
<Panes>
<ajaxToolkit:AccordionPane ID="AccordionPane1" runat="server">
<Header>
<a href="" class="accordionLink" onmouseover="Openpane('0')">1. Accordion</a></Header>
<Content>
The Accordion is a web control that allows you to provide multiple panes and display
them one at a time. It is like having several Panes where only one can be expanded
at a time. The Accordion is implemented as a web control that contains AccordionPane
web controls. Each AccordionPane control has a template for its Header and its Content.
We keep track of the selected pane so it stays visible across postbacks.
</Content>
</ajaxToolkit:AccordionPane>
</Panes>
for every pane, you can call the script function on "MouseOver" event by passing the index of that pane as argument.
Thats it! Hope it would be helpful for someone in same need.

Captcha Control in DotNetNuke/DNN Module
I need to add Captcha Control for couple of contact and submission forms to stop
possible spam bots. I tried with the similar way I approched In previous website
application developed in ASP.NET. But, Its even too easy to add Captcha capability
in forms than we do for simple websites. DotNetNuke/DNN is having a built in Captcha
control which can be used on contact and submission forms.
First you need to add register tag for the control on your module user control.
This will allow to create Captcha control and use it in code. The register line
goes as:
<%@
Register TagPrefix="dnn"
Assembly="DotNetNuke"
Namespace="DotNetNuke.UI.WebControls"%>
Next, is you need to create the control in ascx page as:
<dnn:CaptchaControl runat="server"
ID="dnnCaptchaControl"
ErrorStyle-CssClass="NormalRed"
cssclass="Normal"
ErrorMessage="The
typed code must match the image, please try again"
CaptchaHeight="35"
CaptchaWidth="120"
/>

Believe
me, you are done with DNN Captcha control! You only need to validate whether the
entered value for captcha by user is correct or not. You can write below code in
contact/sybmission form's submit button click event:
if(ctlCaptcha.IsValid)
{
//Captcha is valid! Code to submit
the contact/submission form...
}
else
return;

File download problem: filename with spaces truncated in FF and replaced by underscore in IE
This
is a mere note to remember for future rather than a blog entry. While I am working
on code to download file from server. I write below code:
{
int ChunkSize = 10000;
string sFileFullPath = Server.MapPath("New Text Document.txt");
System.IO.FileInfo toDownload = new System.IO.FileInfo(sFileFullPath);
if (System.IO.File.Exists(sFileFullPath))
{
Response.Clear();
using (FileStream iStream = System.IO.File.OpenRead(sFileFullPath))
{
long dataLengthToRead = iStream.Length;
Byte[] buffer = new Byte[dataLengthToRead];
Response.ContentType = "application/octet-stream";
Response.AddHeader("Content-Disposition", "attachment; filename=" + filename);
while (ChunkSize > 0 && Response.IsClientConnected)
{
if (ChunkSize > dataLengthToRead)
{
ChunkSize = int.Parse(dataLengthToRead.ToString());
}
int lengthRead = iStream.Read(buffer, 0, ChunkSize);
Response.OutputStream.Write(buffer, 0, lengthRead);
Response.Flush();
dataLengthToRead = dataLengthToRead - lengthRead;
}
}
Response.Close();
Response.End();
}
else
{
this.Page.ClientScript.RegisterStartupScript(GetType(), "ShowMessage", "<script language='javascript'>alert('No Files Available');</script>");
}
}
When I ran the application I found that the file which I
need to download was containing spaces in its name like “New Text Document.txt”.
The problem is:
In FF, was truncating the filename from space while showing
the file download dialog . So, its only showing the filename as “New”
(and truncating the rest of the filename after space).

In IE, was replacing the spaces in filename with underscore
( _ ) as “New_Text_Document.txt” while showing the file download dialog
box.

This something I dont want to have. I need to have the exact
filename as it is on server.
The solution is:
Home