Thursday, October 16, 2014

How to create and consume a webservice in asp.net

Today we see how to create and Consume a web service

i have created the video hope this will helps you a lot to create and consume a web service 

















if the video is not loaded correct then refer the link http://screencast.com/t/GMxx1TqndgS


thanks for watching us

Wednesday, October 15, 2014

Started With Simple WebApplication in Visual Studio 2010

1. Open Visual Studio 2010

2. Click on File Menu
                                  -> New
                                              -> Website and then click ok
3. A new Window is opened and add your Folder path over there when you want to save site or click on Browse button and Select the Path of The Project and then Click ok


4. Click on the Default.aspx file
                      this file is default came in the site

                                                           
remove the Extra Content
like:
   <h2>
        Welcome to ASP.NET!
    </h2>
    <p>
        To learn more about ASP.NET visit <a href="http://www.asp.net" title="ASP.NET Website">www.asp.net</a>.
    </p>
    <p>
        You can also find <a href="http://go.microsoft.com/fwlink/?LinkID=152368&amp;clcid=0x409"
            title="MSDN ASP.NET Docs">documentation on ASP.NET at MSDN</a>.
    </p>

5. Right click on the Default.aspx  Page and then view in browser
this step open a browser and you can appear the site in browser

6. In Browser it looks like
7. Now Lets Create the Sample Application(Addition of the two number)

Click on the toolbox and Simply Drag and Drop the 2 Textbox and one button on click of button we have to print addition of the number





now we have to fire the click event of the button

click one design
and simply Double Click on the button
After Clicking New Window is open it is .cs file (Code File)
now inside the button click event we have to make coding of addition
 protected void Button1_Click(object sender, EventArgs e)
    {

    }


add the code
 int a = Convert.ToInt32(TextBox1.Text);
        int b = Convert.ToInt32(TextBox2.Text);
        Response.Write(a + b);

note:
we can only make addition of the real number not string so textbox is always return the String Value so we have to convert it in integer or float
thats Why We use Convert.ToInt32()

now the screen looks like
click on the view in browser and see the output
on the top most Corner You Find The Answer Of the input number
 ok thats All For the day.......................







Tuesday, October 14, 2014

The CSS3 resize property

One of the lesser-appreciated CSS3 properties, resize does exactly what it says: it allows a user to resize almost any  element it is applied to. The property itself is something of a misnomer: it does not make content larger or smaller, and is perhaps more akin to a user-modifiable clip property.

resize can take four values, in addition to inherit:

noneThe element cannot be resized. This is the default for the majority of elements in most browser’s UA stylesheets.
horizontalThe element may be resized by the user, but only horizontally.
verticalThe element is restricted to vertical resizing only
bothThe element may be resized both horizontally and vertically

resize does not apply to block elements in which overflow has been set to visible, nor is it supported on .

On a practical level, browsers that currently support resize apply it to textarea  by default.While this is a good idea – a user should be able to resize a textarea box to get more room for what they are typing – unrestricted resizing can spoil some page designs. In most cases, it is better to rewrite the rule to restrict resize of the textarea to one direction only:

textarea { resize: vertical; }

How to Use Multiple CSS Classes

As per my belief regarding how important it is to keep things simple let’s see another way to make our life easier as front end developers. We will take a look at how we can add multiple classes on a single element.
It’s a very useful method as you don’t have to limit your elements to just one class.
Let’s see it in action –
Step 1: Set up the CSS
Create individual styles.
.box { width:400px; margin: 10px; line-height:200px; }
.border { border: 5px solid #b67600; }
.orangebg { background: orange; }
.fontsize20 { font-size:20px; }
.txtcolor { color:#fff; }
.textaligncenter { text-align:center }
Step 2: Applying the classes in our Html file
If you need to set multiple classes on an element, you add them simply by separating them with a space in your attribute.
<div class=”box border orangebg “>
<p class=”fontsize20 txtcolor textaligncenter”>This is just an example</p>
</div>
This is how it looks:
How to Use Multiple CSS Classes
Browser compatibility
All latest support this method. Even IE support till version 7 is good but IE 6 behaves differently. If you want support for IE 6, you can just fix it with conditional styles.