DateTime Dtnow;
Dtnow = DateTime.Now;
DateTime DtAgo;
DtAgo= DateTime.Now.AddDays();
TimeSpan tsDiff = Dtnow.Subtract(DtAgo);
string Diff = tsDiff.ToString() or tsDiff.Minutes.ToString();
Tuesday, January 20, 2009
squirrelmail Free Email Server

SquirrelMail is a web-based email application started by Nathan and Luke Ehresman and written in the PHP scripting language. It can be installed on almost all web servers as long as PHP is present and the web server has access to an IMAP and SMTP server.
http://www.squirrelmail.org
TemplateField & BoundField & Command Field in Gridview C# ASP.NET
- <asp:BoundField DataField="ID" HeaderText="ID" >
- </asp:BoundField>
- <asp:TemplateField HeaderText="ID" SortExpression="ID" >
- <EditItemTemplate>
- <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("ID") %>'></asp:TextBox>
- </EditItemTemplate>
- <ItemTemplate>
- <asp:Label ID="Label1" runat="server" Text='<%# Bind("ID") %>'></asp:Label>
- </ItemTemplate>
- </asp:TemplateField>
- <asp:TemplateField>
- <ItemTemplate>
- <asp:ImageButton ID="imgbutton" runat="server" CausesValidation="false" CommandName="Delete" ImageUrl="images.png" Text="" CommandArgument="<%# ((GridViewRow) Container).RowIndex %>" ToolTip="delete file" />
- </ItemTemplate>
- </asp:TemplateField>
- # in Code Behind
- protected void Grid_RowCommand(object sender, GridViewCommandEventArgs e)
- {
- if (e.CommandName == "Delete")
- {
- int rowIndex = Convert.ToInt32(e.CommandArgument);
- GridViewRow row = (sender as GridView).Rows[rowIndex];
- int Id = (int)Grid.DataKeys[row.RowIndex].Value;
- }
- }
- protected void Grid_RowDataBound(object sender, GridViewRowEventArgs e)
- {
- if (e.Row.RowType == DataControlRowType.DataRow)
- {
- DataRowView rowView = (DataRowView)e.Row.DataItem;
- ImageButton imgButton = (ImageButton)e.Row.Cells[1].Controls[1];
- }
- }
Saturday, January 17, 2009
Flash Demo UML
this is 16 MB falsh demo of How to Model Rational RequisitePro use case requirements for Rational Software Architect.
to download go to IBM and login with your account:
http://www.ibm.com/developerworks/offers/lp/demos/summary/modelreq.html?S_TACT=105AGY17&S_CMP=TRLPORT
to download go to IBM and login with your account:
http://www.ibm.com/developerworks/offers/lp/demos/summary/modelreq.html?S_TACT=105AGY17&S_CMP=TRLPORT
Thursday, January 15, 2009
How to write HTML source code in your Blog
with http://quickhighlighter.com/ you can make HTML code visible in your webpages
if you want to have source code go to http://code.google.com/p/syntaxhighlighter/
- <script type="text/javascript" language="javascript">
- document.getElementById('<%= txtUsername.ClientID %>').focus();
- </script>
if you want to have source code go to http://code.google.com/p/syntaxhighlighter/
Tuesday, January 13, 2009
Set Focus on login textbox on the page load asp.net
document.getElementById('<%= txtUsername.ClientID %>').focus();
Install TOM TOM Navigator 6 on Pocket PC
I have a windows mobile phone and on the CD that I have there is a TOM TOM navigator application for PC that allows me to add maps and voice to application on my phone.
but the problem was that I uninstalled the application on my phone and I wasnt able to find the sofware to install on my phone.
so if you want to install TOM TOM navigator on you phone go to
http://uk.support.tomtom.com/cgi-bin/tomtom_uk.cfg/php/enduser/std_adp.php?p_faqid=6736&Lid=1
all the steps are inside the page
but the problem was that I uninstalled the application on my phone and I wasnt able to find the sofware to install on my phone.
so if you want to install TOM TOM navigator on you phone go to
http://uk.support.tomtom.com/cgi-bin/tomtom_uk.cfg/php/enduser/std_adp.php?p_faqid=6736&Lid=1
all the steps are inside the page

Sunday, January 11, 2009
Formalism
My Add-ones plugin in Firefox 3
1. Better GMail
Enhance the Gmail Capabilities
2. DrogDropUpload
Drop your files to Gmail for attachment
3.Video Downloadhelper
easy way to download the videos
4.DownThemAll
Download Manager in FireFox
5.Firebug
You can edit, debug, and monitor CSS, HTML, and JavaScript live in any web page...
6.Web developer
Adds a menu and a toolbar with various web developer tools.
7.Stylish
Allows you to add style to FF and then you can add multiple style like
Bright Focus for Textboxes Only (modified) from here : http://userstyles.org/styles/10652
8.IranianCalender
Display today date in Iranian calendar in the status bar.
9.ColorZilla
ColorPicker
10. Autofill forms
11.ColorZilla
Enhance the Gmail Capabilities
2. DrogDropUpload
Drop your files to Gmail for attachment
3.Video Downloadhelper
easy way to download the videos
4.DownThemAll
Download Manager in FireFox
5.Firebug
You can edit, debug, and monitor CSS, HTML, and JavaScript live in any web page...
6.Web developer
Adds a menu and a toolbar with various web developer tools.
7.Stylish
Allows you to add style to FF and then you can add multiple style like
Bright Focus for Textboxes Only (modified) from here : http://userstyles.org/styles/10652
8.IranianCalender
Display today date in Iranian calendar in the status bar.
9.ColorZilla
ColorPicker
10. Autofill forms
11.ColorZilla
Thursday, January 8, 2009
Disable button to prevent multiple click C#.net
just add following code in Page_load
Button1.Attributes.Item("onclick") = "this.disabled=true;" & GetPostBackEventReference(Button1).ToString
Button1.Attributes.Item("onclick") = "this.disabled=true;" & GetPostBackEventReference(Button1).ToString