Wednesday, June 4, 2014

State Management

State management means to preserve state of a control, web page, object/data, and user in the application explicitly 
Types of state management  
There are two types of state management techniques: client side and server side.
Client side
Hidden Field
View State
Cookies
Control State
Query String
Server side
Session
Application

Monday, March 3, 2014

Delete Files from Directory Using Asp.Net.

Here I am going to explain, How can you Delete  Files from Directory (Folder) Using Asp.Net.
Use the Below function for Delete  Files from Directory (Folder).

protected void deletefiles()
    {
        string path = string.Empty;
        path = "Image";  // Your Folder Name
        if (Directory.Exists(HttpContext.Current.Server.MapPath(path)))
        {

            string[] files = System.IO.Directory.GetFiles(HttpContext.Current.Server.MapPath(path));

            foreach (string file in files)
            {

                File.Delete(file);

            }

        }
    }

Tuesday, February 18, 2014

Calculation using Asp.Net

Here I am going to explain ,How can you calculate arithmetic  details in asp.net.
Example : 3*4-68*(5+3). Here you can calculate all type of arithmetic  calculation.
In previous articles I explained How can you Rotate Image In Asp.Net ? ,
How to Print Images in Runtime Using ASP.Net .

Download Code Here

Wednesday, January 15, 2014

Print Images in runtime Using ASP.Net .

Here I am going to explain ,How can you  print number Images in Runtime using Asp.Net.
I use a Place Holder control to print number of images in run time.
In previous articles I explained How can you Rotate Image In Asp.Net ? ,
How to Print Data Using JavaScript.
Very Easy way to print number of images in run time.

Download Code Here

Demo :

How Can you show Random Image Using WCF ?

Here I am going to Explain How Can you show  Random Image Using WCF ?
In previous articles I explained How can you Create WCF application .

Download Code Here

Demo :
Create WCF Service and Give the WCF service Name Mywcfapp.svc.
It Display 2 Section IMywcfapp.cs and  Mywcfapp.cs.

How can you Create WCF application ?

It Stands for Window Communication Foundation (WCF).

It provides services to different end User to perform various messaging operations.
It  Contain different type of services
i.e  1. Service Contract  
     2. Data Contract
     3. Error Contract
     4. Message Contract

 Service Contract contains 2 section
1.       Service Contract
2.       Operation Contract

In service contract we define the attribute of interface
And in Operation Contract we define the member functions.

How to create WCF services 

Go to solution explorer à Add New Itemà add a WCF services
Give the service name like mydemo.Svc à Click Add
It display 2 files in appcode folder
i.e :  Imydemo.cs file  and mydemo.cs
Open Imydemo.cs file it contain some predefined methods called as DoWork().