Thursday, February 16, 2012

How to add meta tags dynamically in ASP.NET MVC


i was searching for how to show my site Google search as top link site, i came to know that one approach is to add meta tags.
The following steps i have followed for my site :

Step 1 : Adding section for meta in the the main layout under head section

@RenderSection("metas")

Step 2 : Added the following code in the in child page
@section metas
    {
        <meta name="description" content="Hello world" />
        <meta name="title" content="Hello world, Sample program" />
        <meta name="keywords" content="Test1, Test2, Test3" />
    }

Ref :

http://stackoverflow.com/questions/5531271/razor-engine-seo-meta-tags

Tuesday, February 14, 2012

Android programs for beginners

What programs to learn in android as beginner ?
  1. Writing Hello world Program download screenshot
  2. Creating simple form download  screenshot         
  3. Switching between screens ( Activities) download               
  4. Creating Menus download  
    1. Option menu
    2. Context menu
  5. Creating Notification
    1. Toast messages download screenshot1 screenshot2 
    2. Status bar messages
  6. Creating Dialogs
    1. Alert Dialog
    2. Progress Dialog
    3. Date Picker Dialog download screenshot 
    4. Time Picker Dialog download screenshot
  7. Binding static Data to the Views
    1. List View download screenshot
    2. Spinner( Drop down ) download screenshot
    3. Grid View download 
  8. Binding SQLite( Database ) Data  to the Views 
    1. List View download
    2. Spinner( Drop down )
    3. Grid View download 
  9. Contacts look-up using AutoCompleteTextview ( Content provider ) download
  10. Integration with Maps download
  11. Creating service
    1. Service
    2. Bound Service
  12. Webview download

Dashboard project - download screenshot1 screenshort2

Note : All these samples are implemented in Gingerbread 2.3.3 version (API 10)

Monday, December 14, 2009

Modified Koolwired Imap Project Asp.Net

I found small problem in the koolwired.imap project i.e. returning null value for data of the attachment.
_Message.BodyParts[BodyPartNumber].Attachment is true and even thought the attachment contains some data then _Messa
ge.BodyParts[BodyPartNumber].Data is null.

I fixed this problem, you can download the sample console application using this link :
Click here


I implemented the methods for save attachment and open attachment int ImapAttachment Class.

Output of the sample project :


Thursday, June 25, 2009

Update Panel example



This is Good Exaple for Update panel for more info
see this site : http://www.aspcode.net/How-Ajax-for-ASPNET-updatepanels-work.aspx
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
asp:ScriptManager>
<div>
<table width="80%" border="3">
<tr>
<td>
Label outside all the Update Panels<asp:Label ID="Label3" runat="Server" Font-Bold="true">asp:Label>
<br /><br />
<asp:Button ID="Button3" runat="Server" Text="Refresh" />
<br />
<br />
td>
tr>
<tr>
<td>
<table width="65%" border="2">
<tr>
<td>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
Label within the Parent Update Panel
<asp:Label ID="Label1" runat="server" Font-Bold="true">asp:Label>
<br />
<br />
<asp:Button ID="Button1" runat="server" Text="Refresh" />
<table width="40%" border="1">
<tr>
<td>
<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<br />
<br />
Label within the Child Update Panel
<asp:Label ID="Label2" runat="server" Font-Bold="True">asp:Label>
<br />
<br />
<asp:Button ID="Button2" runat="server" Text="Refresh" />
ContentTemplate>
asp:UpdatePanel>
td>
tr>
table>
ContentTemplate>
asp:UpdatePanel>
td>
tr>
table>
td>
tr>
table>
div>
form>


Default.aspx.cs

protected void Page_Load(object sender, EventArgs e)
{
Label1.Text = System.DateTime.Now.ToString();
Label2.Text = System.DateTime.Now.ToString();
Label3.Text = System.DateTime.Now.ToString();
}


Wednesday, May 6, 2009