Friday 30 May 2014





Description:-

In this Example we Explain that How to Disable Cut,copy,Paste option in TextBox or Disabled CTRL+C, CTRL+V and CTRL+X. in TextBox using Javascript or Jquery.

Due to some reasons or in many situation like don’t allow to copy Email from Email TextBox to Confirm Email TextBox or Copy Password from TextBox to Confirm Password TextBox as we all see in every web application., so we restrict users to copy, paste and cut contents from TextBox by using CTRL+C, CTRL+V and CTRL+X. We can implement this functionality by using below methods.

You can perform this operation in many ways like using javascript or jquery as you preffered.here we explain all the method to restrict the user to do cut,copy,paste in .aspx TextBox in Asp.Net.

To Show Example of How to Upload File in MVC Application then click here upload Image and bind to Gridview in MVC

How to upload File and Fetch file from SqlServer and bind to Gridview fetch file from Sqlserver and bind to Gridview

Disable cut, copy and paste in textbox using jquery, javascript





Description:-

In this Example we Explain that How to Disable Cut,copy,Paste option in TextBox or Disabled CTRL+C, CTRL+V and CTRL+X. in TextBox using Javascript or Jquery.

Due to some reasons or in many situation like don’t allow to copy Email from Email TextBox to Confirm Email TextBox or Copy Password from TextBox to Confirm Password TextBox as we all see in every web application., so we restrict users to copy, paste and cut contents from TextBox by using CTRL+C, CTRL+V and CTRL+X. We can implement this functionality by using below methods.

You can perform this operation in many ways like using javascript or jquery as you preffered.here we explain all the method to restrict the user to do cut,copy,paste in .aspx TextBox in Asp.Net.

To Show Example of How to Upload File in MVC Application then click here upload Image and bind to Gridview in MVC

How to upload File and Fetch file from SqlServer and bind to Gridview fetch file from Sqlserver and bind to Gridview



Description:-

            In this example I explain that how to uploading and returning or downloading file in mvc4 or asp.net mvc. Or returning file from mvc ActionResult to mvc View Page.

I already explain that how to upload file or multiple file in mvc4 previously http://aspsolutionkirit.blogspot.in/2013/08/how-to-upload-multiple-file-in-mvc.html  so now we direct concerntrate only on how to returning file from ActionResult or action Method to mvc view page.

Uploading and returning files in ASP.NET MVC




Description:-

            In this example I explain that how to uploading and returning or downloading file in mvc4 or asp.net mvc. Or returning file from mvc ActionResult to mvc View Page.

I already explain that how to upload file or multiple file in mvc4 previously http://aspsolutionkirit.blogspot.in/2013/08/how-to-upload-multiple-file-in-mvc.html  so now we direct concerntrate only on how to returning file from ActionResult or action Method to mvc view page.

This entry was posted in :

Tuesday 27 May 2014








Description:-

In this example we explain that how to use DataPager control with Listview in Asp.Net

What is DataPager

DataPager Provides paging functionality for data-bound controls that implement the IPageableItemContainer interface, such as the ListView control.

Why use DataPager

The ListView is a hybrid control between a DataGrid control and Repeater control that join or combines the templating of the Repeater control and the editing features of the data grid control.

We all know that The ListView control doesn't support paging, so the DataPager serves as an external control to provide paging facility.
 DataPager control can be associated with the data-bound control by using the PagedControlID property. Alternatively, by putting the DataPager control inside the data-bound control hierarchy. For example, in the ListView control, DataPager control can be kept inside the ListView-LayoutTemplate.
The number of rows or items that are displayed for each page of data can be customized by changing the PageSize property of the Datapager control.
Pager Fields
Here is some navigation property of the  DataPager control to display navigation controls.
Pager field type
Description
NextPreviousPagerField
Enables users to navigate through pages one page at a time, or to jump to the first or last page.
NumericPagerField
Enables users to select a page by page number.
TemplatePagerField
Enables you to create a custom paging UI.

Page Properties
The following table property escribes the number of rows are displayed in a control.
Property
Description
MaximumRows
The maximum number of records that are displayed for each page of data.
StartRowIndex
The index of the first record that is displayed on a page of data.
TotalRowCount
The total number of records that are available in the underlying data source.

How to use DataPager in Asp.Net

In order to use the DataPager control with the ListView we need to do two things
1. The ID of the ListView control is set for the PagedControlID property of the DataPager control.
2.  and second is you need to define the event OnPagePropertiesChanging which will be raised or fired when the DataPager Page is changed or clicked.

You will also need to import the following namespaces.

using System.Data;
using System.Configuration;
using System.Data.SqlClient;



Handling Paging in ListView using DataPager control
When the page is changed or clicked inside the DataPager the following event hander of the ListView is fired or triggered.
Here first the DataPager control is found and then its SetPageProperties method is executed so that the page numbers are recreated.

protected void OnPagePropertiesChanging(object sender, PagePropertiesChangingEventArgs e)
    {
        (lvemp.FindControl("dtpaging") as DataPager).SetPageProperties(e.StartRowIndex, e.MaximumRows, false);
        this.BindListView();
    }


Sorting Row data in gridview Gridview Sorting 

How to handle Concurrency in Linq to Sql Concurrency Example

How to use ListView and DataPager in asp.net or Using DataPager control in asp.net








Description:-

In this example we explain that how to use DataPager control with Listview in Asp.Net

What is DataPager

DataPager Provides paging functionality for data-bound controls that implement the IPageableItemContainer interface, such as the ListView control.

Why use DataPager

The ListView is a hybrid control between a DataGrid control and Repeater control that join or combines the templating of the Repeater control and the editing features of the data grid control.

We all know that The ListView control doesn't support paging, so the DataPager serves as an external control to provide paging facility.
 DataPager control can be associated with the data-bound control by using the PagedControlID property. Alternatively, by putting the DataPager control inside the data-bound control hierarchy. For example, in the ListView control, DataPager control can be kept inside the ListView-LayoutTemplate.
The number of rows or items that are displayed for each page of data can be customized by changing the PageSize property of the Datapager control.
Pager Fields
Here is some navigation property of the  DataPager control to display navigation controls.
Pager field type
Description
NextPreviousPagerField
Enables users to navigate through pages one page at a time, or to jump to the first or last page.
NumericPagerField
Enables users to select a page by page number.
TemplatePagerField
Enables you to create a custom paging UI.

Page Properties
The following table property escribes the number of rows are displayed in a control.
Property
Description
MaximumRows
The maximum number of records that are displayed for each page of data.
StartRowIndex
The index of the first record that is displayed on a page of data.
TotalRowCount
The total number of records that are available in the underlying data source.

How to use DataPager in Asp.Net

In order to use the DataPager control with the ListView we need to do two things
1. The ID of the ListView control is set for the PagedControlID property of the DataPager control.
2.  and second is you need to define the event OnPagePropertiesChanging which will be raised or fired when the DataPager Page is changed or clicked.

You will also need to import the following namespaces.

using System.Data;
using System.Configuration;
using System.Data.SqlClient;



Handling Paging in ListView using DataPager control
When the page is changed or clicked inside the DataPager the following event hander of the ListView is fired or triggered.
Here first the DataPager control is found and then its SetPageProperties method is executed so that the page numbers are recreated.

protected void OnPagePropertiesChanging(object sender, PagePropertiesChangingEventArgs e)
    {
        (lvemp.FindControl("dtpaging") as DataPager).SetPageProperties(e.StartRowIndex, e.MaximumRows, false);
        this.BindListView();
    }


Sorting Row data in gridview Gridview Sorting 

How to handle Concurrency in Linq to Sql Concurrency Example

Monday 26 May 2014




Description:-



In this example I will explain how to create and delete folder or directory in ASP.Net using C# . On many sitution we have requirement to create and delete folder or directory in ASP.Net web Aplication.

To do this you have to use system.io namespace for createing and deleting facility of the directory or file. i this application  First the path is generated using the folder (directory) Name from the TextBox.

While creating a folder or directory at that time we also provide facility to user that is, first it checks whether the folder or directory with the same name exists if no then the folder is created otherwise user gets a  alert message that the folder with the name already exists.

Same facility provide in deleting  facility While deleting a folder, first it checks whether the folder ( with the same name exists if yes then the folder  is deleted else user gets a JavaScript alert notification that the folder  with the name does not exists and hence cannot be deleted.



sorting data in gridview with up and down arrow sorting data with up and down arrow in gridview

Ajax Autocomplete Textbox search example autocomplete textbox search in asp.net


how to Create And Delete Directory or Folder in ASP.NET Using C#




Description:-



In this example I will explain how to create and delete folder or directory in ASP.Net using C# . On many sitution we have requirement to create and delete folder or directory in ASP.Net web Aplication.

To do this you have to use system.io namespace for createing and deleting facility of the directory or file. i this application  First the path is generated using the folder (directory) Name from the TextBox.

While creating a folder or directory at that time we also provide facility to user that is, first it checks whether the folder or directory with the same name exists if no then the folder is created otherwise user gets a  alert message that the folder with the name already exists.

Same facility provide in deleting  facility While deleting a folder, first it checks whether the folder ( with the same name exists if yes then the folder  is deleted else user gets a JavaScript alert notification that the folder  with the name does not exists and hence cannot be deleted.



sorting data in gridview with up and down arrow sorting data with up and down arrow in gridview

Ajax Autocomplete Textbox search example autocomplete textbox search in asp.net