Blog

Cross Page Postback in ASP.NET

This is a new feature in ASP .NET 2.0. The IButtonControl Interface contains a new property called PostBackUrl which points to the page to which the current page will postback, Button, ImageButton and LinkButton implements this interface and exposes the cross page postback functionality.When user clicks the button in the...

The permissions granted to user ‘Domain\UserName’ are insufficient for performing this operation

I have faced a problem when I tried to open the Reporting Service Web Site for SQL Server 2005 running on Vista Ultimate.As you can see from the title of the post the error was"The permissions granted to user 'Domain\UserName' are insufficient for performing this operation"I have installed SQL Server...

How Microsoft missed this!

Nobody can create a folder anywhere named as “con” , “PRN” , “LPT1” , “LPT2” , “LPT3” , “COM1” ,”aux” , “COM2” or “NUL” on any Windows Operating SystemThis is something pretty cool...and unbelievable... At Microsoft the whole Team, including Bill Gates, couldn't answer why this happened! It is a...

Export to excel in ASP.NET using C#

In this article we are going to show two examples of exporting to excel. First one is how to export grid view control to excel and the second one is how to export data table to excel.1-Export Grid View control to Excel:HtmlForm htmlForm = new HtmlForm(); string fileName = "attachment; filename=Reports.xls"; Response.ClearContent(); Response.AddHeader("content-disposition",...

Send email using C#

We are going to use Gmail outgoing mail server in our code here to demonstrate how you can send an email from your application using C#SmtpClient oSmtpClient = new SmtpClient(); oSmtpClient.Host = "smtp.gmail.com"; //The Outgoing mail server oSmtpClient.Credentials = new NetworkCredential("Your Email", "Your password"); oSmtpClient.Port = 587; oSmtpClient.DeliveryMethod = SmtpDeliveryMethod.Network; oSmtpClient.EnableSsl = true; MailMessage msg =...

Difference between 3 tiers and 3 layers applications

The terms tier and layer are frequently used interchangeably, but actually there is a difference between them:Tiers indicate a physical separation of components, which may mean different assemblies such as DLL, EXE, etc... on the same server or multiple servers; but layers refers to a logical separation of components, such...