Thursday, 11 December 2014

How to Display Google Maps Using C#.net

    How to Display Google Maps Using C#.Net

    Design:
    Open->VS2008/10->FileàNewàprojectàselect Window form Applicationàok
    Create design using controls like Textboxes, Button, Labels and webBrowser1
    Coding
    In search Button Click
    private void button1_Click(object sender, EventArgs e)
            {
                StringBuilder url = new StringBuilder();
                url.Append("https://maps.google.com/maps?q=");

                if (textBox1.Text == "")
                {
                    MessageBox.Show("Enter the Location");
                }
                else if (textBox2.Text == "")
                {
                    MessageBox.Show("Enter the Criteria");
                }
                else
                {
                    url.Append(textBox1.Text + "," + "+");
                    url.Append(textBox2.Text + "," + "+");
                    webBrowser1.Navigate(url.ToString());
                }
            }


Sunday, 9 November 2014

Language Fundamentals in c#.net

Language Fundamentals in c#.net

The programming language C# derives from C and C++; however apart from being entirely object oriented it is type safe and simple too. Many C# statements including expressions and operators have been taken directly taken from your favourite language An important point about C# is that it simplifies and modernizes C++ in the areas of classes, namespaces and exception handling. Much of complex features have not been included or in fact hidden in C# to make it easer to use.



using System;

class He llo {
public static void Main(String[] args)
{
Console.WriteLine("Hello World");
}
}


Constants and Variables

A variable is a named memory location. They are programming elements that can change during program execution. Data that needs to be stored in memory & accessed at a later time are stored in variables. Instead of referring to the memory location by the actual memory address you refer to it with a variable name.

Variables are declared as follows
int a;

They can also be initialized at the time of declaration as follows:
int a = 10;

Constants are very similar to variables. The main difference is that the value contained in memory cannot be changed once the constant is declared. When you declare a constant its value is also specified and this value cannot be changed during program execution. Constants are used in situations where we need to keep the value in some memory location constant. If you use hard-coded values, and the value is changed then it has to be changed in all the locations in the code where it has been used. Instead if we are using constants, all we will need to do is to change the value of the constant. This would propagate the changes to our entire application.

Wednesday, 5 November 2014

Working with HTML

HTML stands for 'Hyper Text Mark-up Language' and is a simple language that anyone can learn and is used for making web pages.the html language is made up of tags that are enclosed in angle brakets, a webpage is completly enclosed within the html tags. Take a look below The first <HEAD> tag tells the browser that it is reading the head of a html document. The </HEAD> tag with the / in it tells the browser that the head part has ended.The first <TITLE> tag tells the browser that it is reading the title of a html document. The </TITLE> tag with the / in it tells the browser that the title has ended.

Example:

<html>
<head>
<title>Page Title</title>
</head>
<body>
<center>
<h1>Welcome</h1>
</center>
//center is used for to set the align
</body>
</html>


Apply Background Color
If you want to apply background color to web page,we are using bgcolor. and if you want to apply backgroundimage to web form we are using tag <body background="winter.jpg">
<html>
<head>
<title>GK DevelopmentS</title>
</head>
<body bgcolor="red">
<p>Hello</p>------------HTML code
<?php
echo "welcome"; ----------PHP code
//echo is used for to display the information
?>
</body>
</html>

Using Headers

If you want to apply headers to web page...we have different types from h1 to h6

Example:

<h1>Welcome</h1>

<h2>Welcome</h2>

<h3>Welcome</h3>

<h4>Welcome</h4>

<h5>Welcome</h5>
<h6>Welcome</h6>

use the <B></B> tags to make text <B>bold</B>

use the <EM></EM> tags to <EM>emphasise text</EM>

use the <U></U> tags to <U>underline text</U>

use the <I></I> tags to make<I>italic text</I>

use the <strong></strong> used for bold


For Navigation from one page to another page:

<a href="register.html">Register</a> and <a href="http://www.bestsavings.in" target="_blank"> GK DevelopmentS</a>

For Image:


<img src="winter.jpg" />