Archives
-
Populating Drop Down List Selected Item while DetailsView in Edit mode
Populating Drop down list when DetailsView is in Edit mode is explained in another article Binding Drop down list when DetailsView is in edit mode.
-
User friendly Tooltip using Ajax Hover Menu Extender control
Hi
-
Multi field validator using Enterprise Library - Validation Application block
There are number of built-in ASP.NET validation controls(RequiredFieldValidator, CompareValidator, CustomValidator and few more) exist. But there is no multi field validator. It is quite feasible to write custom validator to meet the requirement and there are third party controls available such as this one.
-
GridView sorting and paging using custom data method
Hi
-
Dynamic Search using Stored procedure
Hi
-
Learning resources for various .Net Technologies
Hi
-
Windows service – Transfer data btw SQL Server and Oracle 9i
Hi
-
Binding Drop Down List control when Details View is in Edit Mode
Hi
-
Enterprise Library 4.1 :: Exception Handling Application Block
The Exception Handling application block is designed to handle most common exception handling tasks in consistent approach. It allows changing exception handling after the application is deployed by using exception policies that are defined in the application configuration file. It offers the best practices for handling exceptions in .NET applications.
-
Installing ASP.NET Membership services database in SQL Server Express 2008
In this article i have briefly discussed ASP.Net SQL Server Membership database installation on SQL Server 2008 Express.
-
Global Exception Handler for Unhandled Exceptions
Hi
-
Encrypt and Decrypt connectionString section in Web.config
Here is the source code to encrypt and decrypt <connectionString> section in Web.config using RSA Protected Configuration provider model.
-
Export GridView data to CSV file
Response.Clear();
Response.Buffer = true;
Response.AddHeader("content-disposition", "attachment;filename=SearchResults.csv");
Response.Charset = ""; -
DownLoad DataTable to CSV file
1: /// <summary>
2: /// Export DataTable to CSV
3: /// </summary>
4: /// <param name="searchResultsTable"></param>
5: /// <param name="filename"></param>
6: private void ExportsearchResultsTableToCSV(DataTable test, string filename)
7: {
8:
9: //copy the structure of the data table
10: DataTable toExcel = test.Copy();
11: //set http contex
12: HttpContext context = HttpContext.Current;
13:
14: //Loop through data table columns and output
15: foreach (DataColumn column in toExcel.Columns)
16: {
17: context.Response.Write(column.ColumnName + ",");
18:
19: }
20: context.Response.Write(Environment.NewLine);
21:
22: //Loop through rows and output
23: foreach (DataRow row in toExcel.Rows)
24: {
25:
26: for (int i = 0; i < toExcel.Columns.Count; i++)
27: {
28: context.Response.Write(row[i].ToString().Replace(",", string.Empty) + ",");
29:
30: }
31:
32: context.Response.Write(Environment.NewLine);
33:
34: }
35:
36: //output the csv file
37: context.Response.ContentType = "text/csv";
38: context.Response.AppendHeader("Content-Disposition", "attachment; filename=" + filename + ".csv");
39: context.Response.End();
40:
-
DownLoad Selected columns data from DataTable to CSV File
Here is the source code for downloading selected columns from DataTable to CSV file.
-
Details View Updating using custom Edit and Update buttons
Hi