Using Themes in ASP.NET : Skin Files and CSS

When you started working with ASP.NET 2.0, especially using Visual Studio 2005 and added controls to the web page like a Textbox control you may of have recognized that there are two new properties (attributes) present in almost every control. They are the EnableTheming and ThemeID. Also there are additional attributes for the Page directive [...]

Uploading File in ASP.NET using C#

The Code Written below Makes a Page that allows user to upload file to the Server.
 <%@ Page Language=”C#” AutoEventWireup=”true” CodeFile=”Default.aspx.cs” Inherits=”_Default” %>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN”
“http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<script runat=”server”>
 protected void UploadButton_Click(object sender, EventArgs e)
{// Specify the path on the server to save the uploaded file to.
 String savePath = Server.MapPath(”~/UploadedFiles”);
// Before attempting to perform operations [...]

A brief Introudction to ASP.NET

ASP.NET is a unified Web development model that includes the services necessary for you to build enterprise-class Web applications with a minimum of coding. ASP.NET is part of the .NET Framework, and when coding ASP.NET applications you have access to classes in the .NET Framework. You can code your applications in any language compatible with [...]

Javascript in ASP.NET : Showing message for Confirmation

To show the message box on the client side we need to use the client side scripting language like javascript.
To show a simple message box use the script written below
alert(”message to be dispalyed”);
To show a message with options of yes/no
 <script language = “javascript” type = “text/javascript”>function choice
{
choice = confirm(
 

“are you sure”

 

 if(choice)
{
//code when user clicks yes
}
}
</script>
Call [...]

ASP.NET Concept : What are Cookies and Where are they used

A cookie is a small amount of data that is stored either in a text file on the client file system or in memory in the client browser session. It contains site specific information that the server send to the client along with the page output. Cookies can be temporary or persistent.
You can use cookies [...]

ASP.NET Article : Cross Page Posting – A new feature in 2.0

By default, button controls in ASP.NET pages post back to the same page that contains the button, where you can write an event handler for the post. In most cases this is the desired behavior, but occasionaly you will also want to be able to post to another page in your application. The Server.Transfer method [...]

Code showing write Implementation for QueryString in ASP.NET

 The following code shows the implementation of QueryString without any errors.

object ob; 

string num; 
if (Request.QueryString.Count == 0)
{
// write code for when no query string .passed as
// www.sunitcourier/tracknumber.aspx
}
else
{
ob = Request.QueryString["awbnumber"]; 
if (ob == null)
{
// write code for when query string is available but not which you require
//www.sunitcourier/tracknumberaspx?name=rishav
}
else
{
// Write Code for when Query String is available
//www.sunitcourier/tracknumber.aspx?awbnumber=123
num = ob.ToString();
}
}

Click here [...]

Handling Errors and Exceptions in ASP.NET

If the errors are not properly handled in ASP.NET, it may lead to many unwanted consequences such as some part of the code containg error may be revealed and gives a very bad impression to the user if such thing happens in the web application. So these Errors and Exceptions need to handled very carefully. [...]

Difference Between Server.Transfer() and Response.Redirect() Methodin ASP.NET

Both Server.Transfer() and Response.Redirect() method are used for navigation within a website and outside it.
Following are the major differences between them:-

Response.Redirect sends message to the browser saying it to move to some different page, while server.transfer does not send any message to the browser but rather redirects the user directly from the server itself. So [...]