Sunday, 15 June 2014









Description:-
In this Example I explain that how to Disable Right click or Prevent right click on your webpage or Document.

As a web developer we always want something different like disabling mouse button right clicks. Or disable cut copy facility  etc.. for some security purpose.

This is simply thing that disable right click on the webpage by simply add one line of code in <body> tag like
<body oncontextmenu="return false">
...
</body>
Or by using javascript like
<script language="javascript">
document.onmousedown=disableclick;
status="Right Click Disabled";
Function disableclick(event)
{
  if(event.button==2)
   {
     alert(status);
     return false;   
   }
}
</script>


Disable Right Click On Web Page Using Javascript









Description:-
In this Example I explain that how to Disable Right click or Prevent right click on your webpage or Document.

As a web developer we always want something different like disabling mouse button right clicks. Or disable cut copy facility  etc.. for some security purpose.

This is simply thing that disable right click on the webpage by simply add one line of code in <body> tag like
<body oncontextmenu="return false">
...
</body>
Or by using javascript like
<script language="javascript">
document.onmousedown=disableclick;
status="Right Click Disabled";
Function disableclick(event)
{
  if(event.button==2)
   {
     alert(status);
     return false;   
   }
}
</script>


Wednesday, 11 June 2014






Description:-

How to send user confirmation email after registration is complete in your website then Activation link is send to the user email to verify the user in ASP.Net using C# .Net.

also to validate the email Id of the user enter during registration fill up form, a confirmation email with activation link is sent to the email address as user enter in Registration and when user clicks on the Activation  link, his email address is verified and his account gets activated or started.

We all know very well today every website have this Email verification process to exclude the dummy user or for better security.

In this example we will explain that how to send user confirmation email after registration with Activation link in ASP.Net using C# .Net.

How to Send user Confirmation email after Registration with Activation Link in ASP.Net






Description:-

How to send user confirmation email after registration is complete in your website then Activation link is send to the user email to verify the user in ASP.Net using C# .Net.

also to validate the email Id of the user enter during registration fill up form, a confirmation email with activation link is sent to the email address as user enter in Registration and when user clicks on the Activation  link, his email address is verified and his account gets activated or started.

We all know very well today every website have this Email verification process to exclude the dummy user or for better security.

In this example we will explain that how to send user confirmation email after registration with Activation link in ASP.Net using C# .Net.

Tuesday, 10 June 2014





Description:-

 in this Example we explain that how to pass String Array as a Parameter in Sql Query Dynamically or pass String Array as a Parameter to be used in Sql Query using the “IN” command.

In my application that is a security is that if Admin login then Admin is Exists in all type of ACL so Admin can show all the reports and do some changes. But when other user is login then we have to first check the List of the ACL in which user are Exists and then display only those reports that are related to ACl.

For Example :- there are two ACL Account and IT/Software then user xyz have exists in Account ACL then when xyz user is login then only Account related reports are shown IT/software report are not show.

This is the real problem I have faced in my life is that I want to pass the List of ACL to sql query Dynamicaly as a string array and I want to fetch the type of reports that ACL name is same as the we pass as a string array so user can display only those reports that type is equals to those ACL contain.

Syntax:-

StringBuilder query = new StringBuilder("Select * from Employee where emp_name in (");
for (int i = 0; i < empNames.length; i++) {
  if (i > 0) {
    query.append(",");
  }
  query.append(empNames[i].toString());
}

query.append(")");

to show Example of How to Create a Paging in DataList click here Paging in DataList

to show Example of How to Export Gridview Data to PDF File Export Gridview Rows to PDF file


How to pass array of strings dynamically to SQL “IN” clause in Asp.Net





Description:-

 in this Example we explain that how to pass String Array as a Parameter in Sql Query Dynamically or pass String Array as a Parameter to be used in Sql Query using the “IN” command.

In my application that is a security is that if Admin login then Admin is Exists in all type of ACL so Admin can show all the reports and do some changes. But when other user is login then we have to first check the List of the ACL in which user are Exists and then display only those reports that are related to ACl.

For Example :- there are two ACL Account and IT/Software then user xyz have exists in Account ACL then when xyz user is login then only Account related reports are shown IT/software report are not show.

This is the real problem I have faced in my life is that I want to pass the List of ACL to sql query Dynamicaly as a string array and I want to fetch the type of reports that ACL name is same as the we pass as a string array so user can display only those reports that type is equals to those ACL contain.

Syntax:-

StringBuilder query = new StringBuilder("Select * from Employee where emp_name in (");
for (int i = 0; i < empNames.length; i++) {
  if (i > 0) {
    query.append(",");
  }
  query.append(empNames[i].toString());
}

query.append(")");

to show Example of How to Create a Paging in DataList click here Paging in DataList

to show Example of How to Export Gridview Data to PDF File Export Gridview Rows to PDF file





Description:-

In this example we explain that Create Radio button List from the Model in MVC or how to create or bind Radiobutton in mvc or asp.net with mvc razor view.

This is very useful when create a quiz page or online exam aplication where we are going to show some questions with it’s answers to the user and user can select an answer from the available answer options, represented by radio buttons.

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

Let’s suppose that we have a Model for the tbl_hobby and we want to render a radio button list for all hobby. Then Take the following model as an example.

public ActionResult Index()
        {
            ViewBag.Message = "Modify this template to jump-start your ASP.NET MVC application.";
           
            _dbcontext = new HobbyEntities();
           // var list = new _dbcontext.tbl_Employee>
            var model = _dbcontext.tbl_hobby;
            return View(model.ToList<tbl_hobby>());
           
        }

How to bind radio button with model data ASP.Net MVC




Description:-

In this example we explain that Create Radio button List from the Model in MVC or how to create or bind Radiobutton in mvc or asp.net with mvc razor view.

This is very useful when create a quiz page or online exam aplication where we are going to show some questions with it’s answers to the user and user can select an answer from the available answer options, represented by radio buttons.

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

Let’s suppose that we have a Model for the tbl_hobby and we want to render a radio button list for all hobby. Then Take the following model as an example.

public ActionResult Index()
        {
            ViewBag.Message = "Modify this template to jump-start your ASP.NET MVC application.";
           
            _dbcontext = new HobbyEntities();
           // var list = new _dbcontext.tbl_Employee>
            var model = _dbcontext.tbl_hobby;
            return View(model.ToList<tbl_hobby>());
           
        }

This entry was posted in :

Friday, 6 June 2014




 Description:-

In this example we explain that how to Filtering records in WebGrid using dropdownlist in MVC or search record in Gridview based on Dropdown Selection.this post contains a dropdownlist with all country  names and a webgrid that will contain student’s details including their country that will be changed on the dropdownlist  selection change.

So when user select country India from dropdownlist then all record are bind into webgrid that country are India same as if user select country Pakistan from dropdown then all record of Pakistan country are bind into the webgrid.

Here we use Partial view for webgrid when dropdown change by user then partial view for student webgrid are showing with data.

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

Filtering records in WebGrid using dropdownlist in MVC4




 Description:-

In this example we explain that how to Filtering records in WebGrid using dropdownlist in MVC or search record in Gridview based on Dropdown Selection.this post contains a dropdownlist with all country  names and a webgrid that will contain student’s details including their country that will be changed on the dropdownlist  selection change.

So when user select country India from dropdownlist then all record are bind into webgrid that country are India same as if user select country Pakistan from dropdown then all record of Pakistan country are bind into the webgrid.

Here we use Partial view for webgrid when dropdown change by user then partial view for student webgrid are showing with data.

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
This entry was posted in :

Thursday, 5 June 2014





Description:-

            In this example I explain that how to Showing and hiding details in a datagrid row in asp.net.


DataGrid is an ASP.NET server side control  to display data in a tabular format with options of choice, sorting, and editing entries.it is same like Gridview control to manipulate data in tabular format.

In this example we use XML file in which data are stored and we are bind XML data to DataGrid control.in Datagrid we provide to link for each and every rows to show and Hide the details of the record. When user click on show details then prize coloumn of Datagrid will be shown and click on hide link then it will be hide the prize coloumn.

Dynamically Bind data in Ajax Accordion Panel Ajax Accordion panel Example in asp.net

how to Restrict the size of file upload when upload by user restrict the size of file upload control in asp.net

Showing and hiding details in a datagrid row in asp.net





Description:-

            In this example I explain that how to Showing and hiding details in a datagrid row in asp.net.


DataGrid is an ASP.NET server side control  to display data in a tabular format with options of choice, sorting, and editing entries.it is same like Gridview control to manipulate data in tabular format.

In this example we use XML file in which data are stored and we are bind XML data to DataGrid control.in Datagrid we provide to link for each and every rows to show and Hide the details of the record. When user click on show details then prize coloumn of Datagrid will be shown and click on hide link then it will be hide the prize coloumn.

Dynamically Bind data in Ajax Accordion Panel Ajax Accordion panel Example in asp.net

how to Restrict the size of file upload when upload by user restrict the size of file upload control in asp.net

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


Friday, 25 April 2014


Description:-

            In this Example we explain that how to add Calendar Control or Datepicker in a TextBox click in mvc 4 with Asp.Net using Jquery or Implement Calendar control in Asp.Net mvc.

This is the basic thing that we use calendar in every Forms or Razor View to Upload Date in Database. Here in this Example we Add the Calender in TextBox click to upload the Date of the File Upload by using Jquery and also implement the code in Controller class to save the data in database.

Here is a simple code to display Calender in MVC 4 Razor view

<script type="text/jscript">

 $(function () {
        $("#Upload_Date").datepicker(); // Here Upload_Date is the Id of the TextBox.
    });
    </script>

Here we also Describe to upload the File in Database to do this first we have to set this thing

@using (Html.BeginForm("Fileuploads", "FolderHierchy", FormMethod.Post, new { enctype = "multipart/form-data" }))

AND

<input type="file" name="files" id="file" multiple="multiple" />

Here "multipart/form-data" is used for when we upload the file in database and multiple="multiple" is used for to upload multiple file at a time.


 To handle this File Upload in controller you have to implement this code

[HttpPost]
        public ActionResult Fileuploads(Folder containers, IEnumerable<HttpPostedFileBase> files)
        {
          
            foreach (var file in files)
            {
                if (Convert.ToInt32(filesize) < 1073741824)//1GB Limit
                {
             
                     //your code
                }
             }
       }

Insert,Update,Delete in ModalPopup CRUD operation in ModalPopup

Read and Write in Text File in asp.Net Read and Write File in Asp.Net

How to Implement Calendar control in mvc 4 razor or Add Calender in TextBox in mvc4


Description:-

            In this Example we explain that how to add Calendar Control or Datepicker in a TextBox click in mvc 4 with Asp.Net using Jquery or Implement Calendar control in Asp.Net mvc.

This is the basic thing that we use calendar in every Forms or Razor View to Upload Date in Database. Here in this Example we Add the Calender in TextBox click to upload the Date of the File Upload by using Jquery and also implement the code in Controller class to save the data in database.

Here is a simple code to display Calender in MVC 4 Razor view

<script type="text/jscript">

 $(function () {
        $("#Upload_Date").datepicker(); // Here Upload_Date is the Id of the TextBox.
    });
    </script>

Here we also Describe to upload the File in Database to do this first we have to set this thing

@using (Html.BeginForm("Fileuploads", "FolderHierchy", FormMethod.Post, new { enctype = "multipart/form-data" }))

AND

<input type="file" name="files" id="file" multiple="multiple" />

Here "multipart/form-data" is used for when we upload the file in database and multiple="multiple" is used for to upload multiple file at a time.


 To handle this File Upload in controller you have to implement this code

[HttpPost]
        public ActionResult Fileuploads(Folder containers, IEnumerable<HttpPostedFileBase> files)
        {
          
            foreach (var file in files)
            {
                if (Convert.ToInt32(filesize) < 1073741824)//1GB Limit
                {
             
                     //your code
                }
             }
       }

Insert,Update,Delete in ModalPopup CRUD operation in ModalPopup

Read and Write in Text File in asp.Net Read and Write File in Asp.Net

Friday, 11 April 2014



Description:-

In this example I am explain that how to use DropDownCheckBoxes or Drop Down CHeckBoxList control or select multiple Items from DropdownList in ASP.NET.

In .NET  DropDownList does not provide facility with multi select Items in DropdownList. So to overcome this  :-

DropDownCheckBoxes is a server control provides functionality to select multiple items from DropDownList.You can download DropDownCheckBoxes.dll by following the link given below.

http://dropdowncheckboxes.codeplex.com/releases/view/70874

there is a requirement in my application to user can  select multiple items from dropdownlist but Asp.Net does not provide this facility and so this reason I have Developed a Custom class for DropdownList that can give facility to user to select multiple items from DropdownList with CheckBox Facility.

First you have add References of   DropDownCheckBoxes.dll in your website and then you can easily create a DropdownList with multiple items selection.


 to download complete example click below download image link
download here!

Export Gridview to Excel :-   Gridview to Excel

Insert,Update,Delete in ModalPopup CRUD operation in ModalPopup

Read and Write in Text File in asp.Net Read and Write File in Asp.Net

select multiple items from DropDownList in Asp.Net or Drop Down CheckBoxList control in ASP.NET



Description:-

In this example I am explain that how to use DropDownCheckBoxes or Drop Down CHeckBoxList control or select multiple Items from DropdownList in ASP.NET.

In .NET  DropDownList does not provide facility with multi select Items in DropdownList. So to overcome this  :-

DropDownCheckBoxes is a server control provides functionality to select multiple items from DropDownList.You can download DropDownCheckBoxes.dll by following the link given below.

http://dropdowncheckboxes.codeplex.com/releases/view/70874

there is a requirement in my application to user can  select multiple items from dropdownlist but Asp.Net does not provide this facility and so this reason I have Developed a Custom class for DropdownList that can give facility to user to select multiple items from DropdownList with CheckBox Facility.

First you have add References of   DropDownCheckBoxes.dll in your website and then you can easily create a DropdownList with multiple items selection.


 to download complete example click below download image link
download here!

Export Gridview to Excel :-   Gridview to Excel

Insert,Update,Delete in ModalPopup CRUD operation in ModalPopup

Read and Write in Text File in asp.Net Read and Write File in Asp.Net

Friday, 4 April 2014



Description:-

Here in this example we explain that how to resize an image without losing any quality from uploaded images using asp.net.

Resizing your images in asp.net seems to be a problem for many. Getting the image to resize is no problem at all. Getting the resized image to keep the same quality is where the problem lies.

Generally, In social networking sites like in Facebook after upload images they will reduce the size of the images but the quality will be same after seen that I tried to write this post.

I'm going to show you how to resize an image inputted by a user that you can resize to 3 different sizes. In this article we'll resize an image to a full size (600px wide), a medium size (200px wide) and a thumbnail (100px wide). You can also easily change any of these values to match your specific needs.

You can resize the image before saving it , if you are using the fileupload then this code will help you to resize the image with no effect on the picture quality and you can save it in any format such as .png ,.jpeg, .bmp and .gif etc


to show Example of How to Display Gridview Row Detail in Javascript Popup click here Display Gridview ARow Detail in Javascript Popup

to show Example of how to Redirect to another aspx page in javascript click here Redirect to another aspx page in javascript

How to Reduce Image FileSize without loosing Image quality in asp.net.



Description:-

Here in this example we explain that how to resize an image without losing any quality from uploaded images using asp.net.

Resizing your images in asp.net seems to be a problem for many. Getting the image to resize is no problem at all. Getting the resized image to keep the same quality is where the problem lies.

Generally, In social networking sites like in Facebook after upload images they will reduce the size of the images but the quality will be same after seen that I tried to write this post.

I'm going to show you how to resize an image inputted by a user that you can resize to 3 different sizes. In this article we'll resize an image to a full size (600px wide), a medium size (200px wide) and a thumbnail (100px wide). You can also easily change any of these values to match your specific needs.

You can resize the image before saving it , if you are using the fileupload then this code will help you to resize the image with no effect on the picture quality and you can save it in any format such as .png ,.jpeg, .bmp and .gif etc


to show Example of How to Display Gridview Row Detail in Javascript Popup click here Display Gridview ARow Detail in Javascript Popup

to show Example of how to Redirect to another aspx page in javascript click here Redirect to another aspx page in javascript