Recent Posts

Monday, December 22, 2008

How to work with asp master Pages,asp Theme,asp skin and java script in 2005? Step by Step tutorial with c# net source code

To make the application consistent and have consistent page layouts we need to make our look and feel of our web pages standard and consistent.
A master page helps to maintain the consistency in the application with many pages or group of pages.
First a master page is designed and overall web application theme is declared in
the master page and then content pages are added where we display our application contents.
When users request the content pages, they merge with the master page to produce output that combines the layout of the master page with the content from the content page.

It is very helpful to have master and content pages and after you know how to work on them it will be very easy and handy while developing web applications.
In this article i will explain step by step process of how to work on master and content pages and also explain you a simple step of using java script in the pages.

Step 1

First create a web project in asp .net 2005.

Step 2 (Adding Master Page)

Add a new Item in the project and select master page and name the master page appropriately.

Step 3 (Adding Theme Folder)

Right click on the web project and folder and click on theme and you will find App_Themes and one more theme folder added to your project. The folder can be renamed as per your needs, in this article i have renamed it to BlueTheme.
Theme defines the overall theme you want to use for your project and can have skin and .css files.

Step 4 (Adding Css and skin files)

Now right click the BlueTheme folder and add new item and click style sheet and give the appropriate name in this article i have named it BlueTheme.css.
Similarly right click the BlueTheme folder and add new item and click skin file and name it accordingly, I have named it here.

step 5 (Adding Code in skin and css)

In i have added the following code:

asp:Label runat="server" CssClass="RedLabel"
asp:Label runat="server" CssClass="BlueLabel" SkinID="BlueText"

Now in this above code we can see cssclass "Bluelabel" has skinID "BlueText" that means if lables used in the application then it appears red color unless it is given skin id "BlueText" then it appears blue.

I this this explains how the skin file works, this should be sufficient to understand the skin.
Similarly in css I have used the code that defines the whole application theme:

Step 6 (Adding Code in the Master page)

Add the following code in your master page:

Now in above code snipplet you can see the following section :

ContentPlaceHolder ID="MainContent"

This is the place where your main content pages show up and i have renamed its id to "MainContent".
In the above code i have used the following section:

(Note: we can easily find various calendar java scripts on web try google getting it. Or i have provided the link to download all the required files below this article.)

Now i am going to use this java script code to show calendar in our web page.
Now when we include this javascript code in master page then it is accessible to
all the content pages that we use. So only one include in Master page will be
very helpful and manageable code while developing other content pages.

Step 7 (Adding the content page)

To add the content page just right click on the project and click add new item and select web form and give the appropriate name.

Remember to tick the two checkboxes on the right indicating place code in separate file : This will allow to have separate code behind page.
select master page : This will allow to select the master page for this content page.

Step 8 (Adding code in the content Page)
Add the following code in the content page:

In the above code note the following snippet:

Over this code "ctl00_MainContent_txttoDate" this is the textbox control placed in content page.
In the above code note the following snipplet on the top of the page:
Now this will define the page on which theme to use.

Download source for How to work with asp master Pages,asp Theme,asp skin and java script in 2005?

Read more!

Friday, December 12, 2008

Get access to popular magazines like Penthouse, Playboy, MacWorld, PC magazine, MIT Technology Review for free.

This is really cool and works and you can actually get access to the following magazines. 

Follow the following steps to get access to all these  exciting magazines without subscription. 

Step 1 :

You need to have Mozilla Firefox internet browser installed in your PC, if you don't have it then download free internet browser from Mozilla Firefox Site

Step 2: 

Open Mozilla firefox and on your address bar type in "about:config"


Then type "useragent" in Filter bar

Step 4 

Now you will see 4 or 5 listing and check in your value column,  in one of those you will see firefox.

Double click that column and remove the value but copy it and save it somewhere so that later we have to change it to orginal configuration.

Now write the "Mobile Safari 1.1.3" in the value box.

Step 5 : 

Now try to open "" from your address bar, you should get access to all the good magazines that require  magazine subscription

The full detail of this article is derived form the Digital inspiration blog .

Read more!

Wednesday, December 10, 2008

Read Wall Street Journal Articles for Free ( No registration Required)

I found this site where it shows how we can trick Wall Street Journal and get around its subscription and read full articles that were available to subscribers only.

Cool site to go through for all check it out :

Read Wall Street Journal Articles for Free from Digital Inspiration

Read more!

Sunday, December 7, 2008

Learn how to read a xml file from vb.Net application with full source code.

This small article will show you how to read the xml file for processing from the application. This can be very useful for Desktop or application to process the xml files and for the beginners who will be willing to work with the web services and xslt.

Check the following steps to find out how to load and read a xml file:

1. Open an application in 

2. Place a command button on the form.

3. on the command click write the following code.

 Dim myXMLdoc As New Xml.XmlDataDocument

Dim strFileName As String
            Dim strText As String

'Provide the path of the XML 
            strFileName = "C:test1.xml"

            Dim oFile As System.IO.File
            Dim oRead As System.IO.StreamReader

'Read the file from the provided path
            oRead = oFile.OpenText(strFileName)
            strText = oRead.ReadToEnd()

 'Selects the XML Text
        Dim xnr As Xml.XmlNodeReader
        Dim xn As Xml.XmlNode
        Dim xe As Xml.XmlElement = myXMLdoc.DocumentElement

 'Selects the Single Node
        xn = myXMLdoc.SelectSingleNode("/Data/Name")
        If IsNothing(xn) = False Then
            xnr = New Xml.XmlNodeReader(xn)
            While xnr.Read
                If Not (xnr.Value = "") Then
                    Me.txtLatitude = xnr.Value
                End If
            End While
        End If

Read more!

Tuesday, December 2, 2008

ObviouslySomething: Formatting Visual Basic 6 code for HTML

ObviouslySomething: Formatting Visual Basic 6 code for HTML

Read more!