Raju's Tech Blog
MCP <a href="https://twitter.com/sukumarraju" class="twitter-follow-button" data-show-count="false">Follow @sukumarraju</a> <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script> </br></br>
-
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: