Monday 29 August 2011

Basic Programming Concepts Using Razer syntax

The Razor syntax, you can quickly create dynamic web pages with sophisticated features, and it won't take much code to get things done. It isn't an exhaustive examination, just a quick tour through the programming concepts you'll use most often.

The Razor Syntax, Server Code, and ASP.NET

Razor syntax is a simple programming syntax for embedding server-based code in a web page. In a web page that uses the Razor syntax, there are two kinds of content: client content and server code. Client content is the stuff you're used to in web pages: HTML markup (elements), style information such as CSS, client script such as JavaScript, and plain text.
Razor syntax lets you add server code to this client content. If there's server code in the page, the server runs that code first, before it sends the page to the browser. By running on the server, the code can perform tasks that can be a lot more complex to do using client content alone, like accessing server-based databases. Most importantly, server code can dynamically create client content — it can generate HTML markup or other content on the fly and then send it to the browser along with any static HTML that the page might contain. From the browser's perspective, client content that's generated by your server code is no different than any other client content. As you've already seen, the server code that's required is quite simple.
ASP.NET web pages that include the Razor syntax have a special file extension (.cshtml or .vbhtml). The server recognizes these extensions, runs the code that's marked with Razor syntax, and then sends the page to the browser.

Where does ASP.NET fit in?

Razor syntax is based on a technology from Microsoft called ASP.NET, which in turn is based on the Microsoft .NET Framework. The.NET Framework is a big, comprehensive programming framework from Microsoft for developing virtually any type of computer application. ASP.NET is the part of the .NET Framework that's specifically designed for creating web applications. Developers have used ASP.NET to create many of the largest and highest-traffic websites in the world. (Any time you see the file-name extension .aspx as part of the URL in a site, you'll know that the site was written using ASP.NET.)
The Razor syntax gives you all the power of ASP.NET, but using a simplified syntax that's easier to learn if you're a beginner and that makes you more productive if you're an expert. Even though this syntax is simple to use, its family relationship to ASP.NET and the .NET Framework means that as your websites become more sophisticated, you have the power of the larger frameworks available to you.



ch02_programmingintro-8

Language and Syntax

Earlier you saw a basic example of how to create an ASP.NET Web Pages page, and how you can add server code to HTML markup. Here you'll learn the basics of writing ASP.NET server code using the Razor syntax — that is, the programming language rules.
If you're experienced with programming (especially if you've used C, C++, C#, Visual Basic, or JavaScript), much of what you read here will be familiar. You'll probably need to familiarize yourself only with how server code is added to markup in .cshtml files.

Basic Syntax

Combining Text, Markup, and Code in Code Blocks

In server code blocks, you'll often want to output text or markup (or both) to the page. If a server code block contains text that's not code and that instead should be rendered as is, ASP.NET needs to be able to distinguish that text from code. There are several ways to do this.
  • Enclose the text in an HTML element like <p></p> or <em></em>:
    @if(IsPost) {
        // This line has all content between matched <p> tags.
        <p>Hello, the time is @DateTime.Now and this page is a postback!</p>
    } else {
        // All content between matched tags, followed by server code.
        <p>Hello <em>stranger</em>, today is: <br /> </p>  @DateTime.Now
    }
    The HTML element can include text, additional HTML elements, and server-code expressions. When ASP.NET sees the opening HTML tag, it renders everything including the element and its content as is to the browser (and resolves the server-code expressions).
  • Use the @: operator or the <text> element. The @: outputs a single line of content containing plain text or unmatched HTML tags; the <text> element encloses multiple lines to output. These options are useful when you don't want to render an HTML element as part of the output.
    @if(IsPost) {
        // Plain text followed by an unmatched HTML tag and server code.
        @: The time is: <br /> @DateTime.Now
        // Server code and then plain text, matched tags, and more text.
        @DateTime.Now @:is the <em>current</em> time.
    }
    If you want to output multiple lines of text or unmatched HTML tags, you can precede each line with @:, or you can enclose the line in a <text> element. Like the @: operator, <text> tags are used by ASP.NET to identify text content and are never rendered in the page output.
    @if(IsPost) {
        // Repeat the previous example, but use <text> tags.
        <text>
        The time is: <br /> @DateTime.Now
        @DateTime.Now is the <em>current</em> time.
        </text>
    }
    
    @{
        var minTemp = 75;
        <text>It is the month of @DateTime.Now.ToString("MMMM"), and
        it's a <em>great</em> day! <br /><p>You can go swimming if it's at
        least @minTemp degrees. </p></text>
    }
    The first example repeats the previous example but uses a single pair of <text> tags to enclose the text to render. In the second example, the <text> and </text> tags enclose three lines, all of which have some uncontained text and unmatched HTML tags (<br />), along with server code and matched HTML tags. Again, you could also precede each line individually with the @: operator; either way works.

Sunday 28 August 2011

ASP.NET Razor Pages

Introduction to ASP.NET Web Programming Using the Razor Syntax

This chapter gives you an overview of programming with ASP.NET Web Pages using the Razor syntax. ASP.NET is Microsoft's technology for running dynamic web pages on web servers.
1. You add code to a page using the @ character

The @ character starts inline expressions, single statement blocks, and multi-statement blocks:
<!-- Single statement blocks  -->
@{ var total = 7; }
@{ var myMessage = "Hello World"; }
<!-- Inline expressions -->
<p>The value of your account is: @total </p>
<p>The value of myMessage is: @myMessage</p>
<!-- Multi-statement block -->
@{
    var greeting = "Welcome to our site!";
    var weekDay = DateTime.Now.DayOfWeek;
    var greetingMessage = greeting + " Today is: " + weekDay;
}<p>The greeting is: @greetingMessage</p>
 

OUTPUT:



2. You enclose code blocks in braces

A code block includes one or more code statements and is enclosed in braces.
<!-- Single statement block.  -->
@{ var theMonth = DateTime.Now.Month; }<p>The numeric value of the current month: @theMonth</p>
<!-- Multi-statement block. -->
@{
    var outsideTemp = 79;
    var weatherMessage = "Hello, it is " + outsideTemp + " degrees.";
}<p>Today's weather: @weatherMessage</p>

OUTPUT:


3. Inside a block, you end each code statement with a semicolon

Inside a code block, each complete code statement must end with a semicolon. Inline expressions don't end with a semicolon.
<!-- Single-statement block -->
@{ var theMonth = DateTime.Now.Month; }
<!-- Multi-statement block -->
@{
    var outsideTemp = 79;
    var weatherMessage = "Hello, it is " + outsideTemp + " degrees.";
}
<!-- Inline expression, so no semicolon -->
<p>Today's weather: @weatherMessage</p>
4. You use variables to store values

You can store values in a variable, including strings, numbers, and dates, etc. You create a new variable using the var keyword. You can insert variable values directly in a page using @.
<!-- Storing a string -->
@{ var welcomeMessage = "Welcome, new members!"; }<p>@welcomeMessage</p>
<!-- Storing a date -->
@{ var year = DateTime.Now.Year; }
<!-- Displaying a variable -->
<p>Welcome to our new members who joined in @year!</p>

OUTPUT:

5. You enclose literal string values in double quotation marks

A string is a sequence of characters that are treated as text. To specify a string, you enclose it in double quotation marks:
@{ var myString = "This is a string literal"; }
If the string that you want to display contains a backslash character (\) or double quotation marks, use a verbatim string literal that's prefixed with the @ operator. (In C#, the \ character has special meaning unless you use a verbatim string literal.)
<!-- Embedding a backslash in a string -->
@{ var myFilePath = @"C:\MyFolder\"; }<p>The path is: @myFilePath</p>
To embed double quotation marks, use a verbatim string literal and repeat the quotation marks:
<!-- Embedding double quotation marks in a string -->
@{ var myQuote = @"The person said: ""Hello, today is Monday."""; }<p>@myQuote</p>

OUTPUT:

Note   The @ character is used both to mark verbatim string literals in C# and to mark code in ASP.NET pages.
6. Code is case sensitive

In C#, keywords (like var, true, and if) and variable names are case sensitive. The following lines of code create two different variables, lastName and LastName.
@{
    var lastName = "Smith";
    var LastName = "Jones";
}
If you declare a variable as var lastName = "Smith"; and if you try to reference that variable in your page as @LastName, an error results because LastName won't be recognized.
Note   In Visual Basic, keywords and variables are not case sensitive.
7. Much of your coding involves objects

An object represents a thing that you can program with — a page, a text box, a file, an image, a web request, an email message, a customer record (database row), etc. Objects have properties that describe their characteristics — a text box object has a Text property (among others), a request object has a Url property, an email message has a From property, and a customer object has a FirstName property. Objects also have methods that are the "verbs" they can perform. Examples include a file object's Save method, an image object's Rotate method, and an email object's Send method.
You'll often work with the Request object, which gives you information like the values of form fields on the page (text boxes, etc.), what type of browser made the request, the URL of the page, the user identity, etc. This example shows how to access properties of the Request object and how to call the MapPath method of the Request object, which gives you the absolute path of the page on the server:
<table border="1">
<tr>
    <td>Requested URL</td>
    <td>Relative Path</td>
    <td>Full Path</td>
    <td>HTTP Request Type</td>
</tr>
<tr>
    <td>@Request.Url</td>
    <td>@Request.FilePath</td>
    <td>@Request.MapPath(Request.FilePath)</td>
    <td>@Request.RequestType</td>
</tr>
</table>
OUTPUT:


8. You can write code that makes decisions

A key feature of dynamic web pages is that you can determine what to do based on conditions. The most common way to do this is with the if statement (and optional else statement).
@{
   var result = "";
   if(IsPost)
   {
      result = "This page was posted using the Submit button.";
   }
   else
   {
      result = "This was the first request for this page.";
   }
}
<!DOCTYPE html>
<html>
    <head>
        <title></title>
    </head>
<body>
<form method="POST" action="" >
  <input type="Submit" name="Submit" value="Submit"/>
  <p>@result</p>
</form>
</body>
</html>
    </body>
</html>
The statement if(IsPost) is a shorthand way of writing if(IsPost == true). Along with if statements, there are a variety of ways to test conditions, repeat blocks of code, and so on, which are described later in this chapter.

OUTPUT:



A Simple Code Example

This procedure shows you how to create a page that illustrates basic programming techniques. In the example, you create a page that lets users enter two numbers, then it adds them and displays the result.
  1. In your editor, create a new file and name it AddNumbers.cshtml.
  2. Copy the following code and markup into the page, replacing anything already in the page.
    @{
        var total = 0;
        var totalMessage = "";
        if(IsPost) {
    
            // Retrieve the numbers that the user entered.
            var num1 = Request["text1"];
            var num2 = Request["text2"];
    
            // Convert the entered strings into integers numbers and add.
            total = num1.AsInt() + num2.AsInt();
            totalMessage = "Total = " + total;
        }
    }
    <!DOCTYPE html>
    <html lang="en">
      <head>
        <title>Add Numbers</title>
        <meta charset="utf-8" />
        <style type="text/css">
          body {background-color: beige; font-family: Verdana, Arial;
                margin: 50px; }
          form {padding: 10px; border-style: solid; width: 250px;}
        </style>
      </head>
    <body>
      <p>Enter two whole numbers and then click <strong>Add</strong>.</p>
      <form action="" method="post">
        <p><label for="text1">First Number:</label>
          <input type="text" name="text1" />
        </p>
        <p><label for="text2">Second Number:</label>
          <input type="text" name="text2" />
        </p>
        <p><input type="submit" value="Add" /></p>
      </form>
    
      <p>@totalMessage</p>
    </body>
    </html>
    Here are some things for you to note:
    • The @ character starts the first block of code in the page, and it precedes the totalMessage variable that's embedded near the bottom of the page.
    • The block at the top of the page is enclosed in braces.
    • In the block at the top, all lines end with a semicolon.
    • The variables total, num1, num2, and totalMessage store several numbers and a string.
    • The literal string value assigned to the totalMessage variable is in double quotation marks.
    • Because the code is case-sensitive, when the totalMessage variable is used near the bottom of the page, its name must match the variable at the top exactly.
    • The expression num1.AsInt() + num2.AsInt() shows how to work with objects and methods. The AsInt method on each variable converts the string entered by a user to a number (an integer) so that you can perform arithmetic on it.
    • The <form> tag includes a method="post" attribute. This specifies that when the user clicks Add, the page will be sent to the server using the HTTP POST method. When the page is submitted, the if(IsPost) test evaluates to true and the conditional code runs, displaying the result of adding the numbers.
  3. Save the page and run it in a browser. (Make sure the page is selected in the Files workspace before you run it.) Enter two whole numbers and then click the Add button. ch02_programmingintro-7

 

Thursday 25 August 2011

Create an ASP.NET website from scratch

Introducing WebMatrix

Seamless, simple, small, and best of all, free, WebMatrix includes a complete collection of web development tools that installs in minutes. It elegantly integrates a web server with database and programming frameworks to create a single, integrated experience.  Use WebMatrix to streamline the way you code, test, and publish your own ASP.NET or PHP website. Or start a new site using the world's most popular open source apps, like DotNetNuke, Umbraco, WordPress, or Joomla. With WebMatrix on your desktop, you're using the same powerful web server, database engine, and frameworks that will run your website on the internet, which makes the transition from development to production smooth and seamless.
image01a

Getting WebMatrix

To install WebMatrix, you can use Microsoft's Web Platform Installer (Web PI 3.0), which is a free application that makes it easy to install and configure web-related technologies. You can install the Web Platform Installer from the WebMatrix download page.
On the download page, click Install Now. At the security warnings, click Run. On the Web Platform Installer page, click Install.
image01
On the Web Platform Installation screen, WebMatrix displays a list of additional required components. Click I Accept. The install begins.

Creating Your First Website

Right out of the box, WebMatrix gives you a number of options for how to create sites. You can create a site from a template or from a folder that already contains ASP.NET web pages. Or you can download an open-source application from the gallery as the basis for your site.
image02
For this walkthrough, click Site From Template to see a list of available templates.
image03
Select the Empty Site template to create a new site from scratch, and name it WebMatrixDemo. Click OK.
image04
Before moving on, let's take a quick look around the WebMatrix user interface. In the lower-left part of the page you see that you can select one of four workspaces. When you open WebMatrix and select a site, you start off in the Site workspace, which lets you perform tasks like specifying site settings (for example, designating a default web page) and monitoring HTTP requests.
To create, delete, and update files such as web pages, select the Files workspace. The site's folder structure appears in the left pane, and when you select a file, you can edit it in the content pane on the right.
image05
To add a database to your site and then add tables and data to it, select the Databases workspace. You get a list of databases in the left pane, and the content pane changes depending on what you want to do with a selected database.
image06
Finally, to get information about how to help your site rank high in search engine results, select the Reports workspace. Once you've run some reports, you'll see them listed on the left, and when you select one, you'll see the reports contents on the right.
image07
You might have noticed that across the top of the page is a Quick Access Toolbar and a ribbon, like in Microsoft Office 2010. Some of the buttons on the ribbon's Home tab are different in each workspace, but the buttons in the Site group are always the same.
image08
You use My Sites to choose a site to work on, Publish to make the site publicly available, Run to test the site in a browser, and Start/Stop/Restart to work with the web server that you'll use in WebMatrix to test your website (IIS Express).  You'll learn more about IIS Express in a minute.

Adding an ASP.NET Web Page to Your Site

To get a feel for how to work in WebMatrix and what you can do with it, begin by creating a web page. Select the Files workspace and then click New. You get a list of templates to choose from for various file types.
image09
Select the CSHTML template and call the new page Default.cshtml. The extension .cshtml indicates that this is an ASP.NET Web page. It can contain HTML, JavaScript, and CSS, just like a normal HTML page, and you can make the page dynamic by adding special code that runs on the server.
Click OK.
The CSHTML template creates a new page with some basic HTML.
image10
As you can see, this is ordinary HTML markup.  Add some simple "Hello World" HTML to it.
image11
Now click the Default.cshtml file in the navigation pane and then click the Run button to see this page in the browser.
image12


Wednesday 24 August 2011

Get Started with ASP.NET

ASP.NET is a free web framework for building great Web sites and Web applications using HTML, CSS and JavaScript. ASP.NET supports three approaches to build web sites:
  • Web Pages

    Provides a simple way to seamlessly connect to a database or add in dynamic server code into HTML using the new, light 'Razor' syntax for fast development.
  • Web Forms

    Offers a familiar model that lets you reuse controls and incorporate data into your Web site, making your work reusable and you more productive.

  • MVC

    Builds on a pattern that enables clean separation of concerns within your web applications, and delivers full control over HTML for enjoyable, agile development.

    What is ASP.NET Web Pages?

    ASP.NET Web Pages and the new Razor syntax provide a fast, approachable, and lightweight way to combine server code with HTML to create dynamic web content. Connect to databases, add video, link to social networking sites, and include many more features that let you create beautiful sites using the latest web standards.
    WebMatrix is a free development tool that makes Web Pages development easy.

    What is ASP.NET Web Forms?

    ASP.NET Web Forms lets you build dynamic websites using a familiar drag-and-drop, event-driven model. A design surface and hundreds of controls and components let you rapidly build sophisticated, powerful UI-driven sites with data access.
    Visual Studio Express provides a free development tool that makes Web Forms development easy.


    What is ASP.NET MVC?

    ASP.NET MVC gives you a powerful, patterns-based way to build dynamic websites that enables a clean separation of concerns and that gives you full control over markup for enjoyable, agile development. ASP.NET MVC includes many features that enable fast, TDD-friendly development for creating sophisticated applications that use the latest web standards.
    Visual Studio Express provides a free development tool that makes MVC development easy.

    What is WebMatrix?

    WebMatrix is a free, lightweight set of web development tools that provides the easiest way to build websites. It includes IIS Express (a development web server), ASP.NET (a web framework), and SQL Server Compact (an embedded database). It also includes a simple tool that streamlines website development and makes it easy to start websites from popular open source apps. The skills and code you develop with WebMatrix transition seamlessly to Visual Studio and SQL Server.
    The web pages that you create using WebMatrix can be dynamic—that is, they can alter their content or style based on user input or on other information, such as database information. To program dynamic Web pages, you use ASP.NET with the Razor syntax and with the C# or Visual Basic programming languages.
    If you already have programming tools that you like, you can try the WebMatrix tools or you can use your own tools to create websites that use ASP.NET.
    This chapter shows you how WebMatrix makes it easy to get started creating websites and dynamic web pages.

    Installing WebMatrix

    To install WebMatrix, you can use Microsoft’s Web Platform Installer, which is a free application that makes it easy to install and configure web-related technologies.
    1. If you don't already have the Web Platform Installer, download it from the following URL:
    2. Run the Web Platform Installer, select Spotlight, and then click Add to install WebMatrix. ch01_learnweb-1

    Getting Started with WebMatrix

    To begin, you'll create a new website and a simple web page.
    1. Start WebMatrix. ch01_learnweb-2
    2. Click Site From Template. Templates include prebuilt files and pages for different types of websites. ch01_learnweb-3
    3. Select Empty Site and name the new site Hello World.
    4. Click OK. WebMatrix creates and opens the new site. At the top, you see a Quick Access Toolbar and a ribbon, as in Microsoft Office 2010. At the bottom left, you see the workspace selector, which contains buttons that determine what appears above them in the left pane. On the right is the content pane, which is where you view reports, edit files, and so on. Finally, across the bottom is the notification bar, which displays messages as needed.
      ch01_learnweb-4

Tuesday 23 August 2011

thunderbird.png

Mozilla Thunderbird, Portable Edition

real email, on the go™

Mozilla Thunderbird®, Portable Edition is the popular Mozilla Thunderbird email client bundled with a PortableApps.com launcher as a portable application, so you can take your email, address book and account settings with you. You can also add in GPG and Enigmail to encrypt and sign your email.


Software made to make email easier.

Thunderbird is a free email application that's is easy to setup and customize - and its loaded with great features!


Features

portablethunderbird_small.pngMozilla Thunderbird is the safe, fast email client that's easy to use. It has lots of great features including quick message search, customizable views, support for IMAP/POP, RSS support and more. Plus, the portable version leaves no personal information behind on the machine you run it on, so you can take your email and adress book with you wherever you go.



Thunderbird Portable-Specific Issues

  •  Installing Thunderbird Portable
  •  Using Thunderbird Portable
  •  Upgrading Thunderbird Portable
  •  Adding GPG and Enigmail
  •  Adding the Address Book to the PortableApps.com Menu
  •  Copying your local Thunderbird settings to Thunderbird Portable
  •  Using a Second (or Third) Profile with Thunderbird Portable
  •  Improving Thunderbird Portable's Performance
  •  Running from a CD (Thunderbird Portable Live)
  •  Using Thunderbird with Webmail (Hotmail, Yahoo, etc)
  •  Known Issues
  •  Modifications - A list of the modifications made to Thunderbird in this package
  •  Additional Recommended Settings - Some additional recommendations to improve performance
  •  Version History

Legacy Versions

Older versions of Thunderbird Portable are available for use in testing extension compatibility and other situations.


Applications

  • Accessibility
  • Development
  • Education
  • Games
  • Graphics & Pictures
  • Internet
  • Music & Video
  • Office
  • Security
  • Utilities


Monday 22 August 2011

Software Informer : Featured Mozilla Browser Software


FireFox
 
A Ligter software alternate to MS Internet Explorer, Mozilla FireFox is safer than IE after many studies. You can find versions of Mac and Linux OS as well  customize your browser by adding any one of the huge number of add - onns available on the  internet.


SeaMonkey

SeaMonkey is a all in one  Internet Browser powered by Mozilla Foundation. It is still in development demonstrating the capacity and the desire of the user to create the perfect browser. There are many packages availble covering practically every  windows word , Mac and Linux operating system.


Orca Browser

Orca Browser is a new browser based on gecko engine as well as mozilla FireFox. In fact it borrows most of the features present in FireFox, like the error console and the tabbed pages. But there are some extra features like floating Toolbar and online storage feature.


FasterFox

FasterFox - Performance and network tweaks for FireFox. MainFeatures:- Prefetch Links Dynamic speed increases can be obtained with FasterFox's prefetching unique mechanism, which recycles idle bandwidth by silently loading and caching all of the links on the page you are browsing.


MineField

Mozilla FireFox is the secondly used web browser. FireFox is open-source software available almost for all operating systems. This is the result of its popularity. If we compare FireFox with Internet Explorer, we can easily see that it is faster and uses less CPU and results in lower memory load. Mozilla MineField is the codename for the new version of FireFox.

Sunday 21 August 2011


Image of Kindle

Kindle Software Update Version 3.1






The free software update available for your Kindle that is being delivered via a Wi-Fi connection. To receive the update, please turn your wireless on and connect to an available Wi-Fi network

Wireless on Your Kindl

Setting Up Wireless on Your Kindle

  •      Connecting Wirelessly via Wi-Fi
  •      Manually Adding a New Wi-Fi Network
  •      Remembering and Forgetting Wi-Fi Networks
  •      Free 3G Coverage Map
  •      Syncing Material Across Your Devices
  •      Receiving Your Kindle Content Wirelessly
  •      Wireless Service Options and International Fees
  •      Wireless Status Indicators
  •      3G Wireless Troubleshooting
  •      Wi-Fi Troubleshooting 

Setting Up Wireless on Your Kindle

Kindle uses either Free 3G or Wi-Fi technology to enable you to wirelessly shop for and download Kindle content on the go. Your books are delivered wirelessly, typically in less than 60 seconds. If your Kindle has Wi-Fi and 3G, you can choose the most convenient wireless connection.
While you're reading, and for many other activities, your Kindle does not need to connect to a wireless network. Other activities such as shopping in the Kindle Store and purchasing books do require a wireless connection.

No monthly wireless bills, data plans, or commitments

Amazon pays for Kindle's wireless connectivity so you won't see a wireless bill. There is no wireless setup--you are ready to shop, purchase and read right out of the box.



Connecting wirelessly via Free 3G

For Kindle models that include Free 3G, wireless connectivity is automatic.your Kindle is already connected wirelessly using 3G. Your Kindle automatically turns 3G coverage off when you connect using Wi-Fi. If you disconnect from a Wi-Fi network or if you move out of Wi-Fi range, Kindle automatically switches back to 3G coverage. If you want to turn off 3G coverage, you can turn wireless off. Keep in mind that turning wireless off also disables Wi-Fi connections.

Connecting with Wi-Fi

Your Kindle can connect to Wi-Fi networks or hotspots that use the 802.11b, 802.11g, or 802.11n (in B or G compatibility mode) standard. Kindle does not connect to enterprise or ad-hoc Wi-Fi networks (networks that allow peer-to-peer connections without a wireless access point). Keep in mind that you must be within range of one or more Wi-Fi networks in order to connect to one.
 

From the Home screen, press Menu and select "Sync and Check for Items." The software update will automatically download in the background and install the next time your Kindle goes into sleep mode.

Here's how to download the Kindle software update version 3.1 and transfer it to your Kindle via USB:
  1. Determine your software version: From Home, select Menu, then Settings. On the Settings screen you will see the Kindle version at the bottom of the screen. If you see "Version Kindle 3.0.3" or earlier (3.0.3, 3.0.2, 3.0.1, or 3.0), please proceed with the steps below to update your Kindle to the latest software.

    version

  2. Your Kindle serial number is visible at the bottom of the Settings Screen. From Home, select Menu, then Settings.
  3. Transfer software to your Kindle: Turn your Kindle on and connect it to your computer using the USB cable. Drag and drop the new update file from your computer to the root Kindle drive. (The drive contains a number of folders - such as "audible," "documents," and "music" - and is typically displayed as a "device" icon).
  4. Monitor file transfer and disconnect: Check your file transfer progress to ensure file transfer to your Kindle is complete before disconnecting. After the file has transferred successfully, eject the Kindle to safely disconnect Kindle from your computer. Disconnect the USB cable from your Kindle and your computer.
  5. Start the software update: Go to the Home screen, press the Menu key, and select "Settings." Press the Menu key again, and then select "Update Your Kindle." (This option will be grayed out if the most recent update has already been installed or if the file transfer was not successful.) Select "Ok" when prompted if you want to perform an update. Your Kindle will restart twice during the update. After the first restart, you will see "Your Kindle is Updating".
  6. Once the update is complete: Your Kindle will automatically restart a second time. When you go to the Settings page, you should notice Version: Kindle 3.1 at the bottom of the screen. Once you see this, you know your update is complete.