Aspdotnet-Suresh

aspdotnet-suresh offers C#.net articles and tutorials,csharp dot net,asp.net articles and tutorials,VB.NET Articles,Gridview articles,code examples of asp.net 2.0 /3.5,AJAX,SQL Server Articles,examples of .net technologies

3 tier architecture example in asp.net with C#

May 17, 2010 226 comments
Introduction

Here I will explain about uses of 3-Tier architecture and how to create or implement 3-tier architecture for our project in asp.net 

Description

1.    What is the use of 3-tier architecture and why we go for that architecture? 
2.    First we need to know what 3-Tier architecture is. 
3.    How to create 3-Tier architecture for our project?

WPF (Windows Presentation Foundation) in .NET

May 12, 2010 22 comments
Windows Presentation Foundation (WPF)
The Windows Presentation Foundation is Microsoft’s next generation UI framework to create applications with a rich user experience. It is part of the .NET framework 3.0 and higher.
WPF combines application UIs, 2D graphics, 3D graphics, documents and multimedia into one single framework. Its vector based rendering engine uses hardware acceleration of modern graphic cards. This makes the UI faster, scalable and resolution independent.

Cursors in SQL Server

May 10, 2010 6 comments
Cursors can be considers as named result sets which allow a user to move through each record one by one. SQL Server 2000 provides different types of cursors to support different type of scrolling options. 
When we use a Select statement in a stored procedure to get some result, we can get a collection of all the records which satisfy the given criteria. This result set can be returned back as a whole to the client application. We can’t move through each individual record one by one in this situation inside a stored procedure. Therefore, whenever we find some situation where we need to process each record individually we can use cursors. 

Publishing Web Site in asp.net

May 5, 2010 2 comments

Here I will explain how to publish or deploy the website in local machine. To publish website first we need to check whether IIS installed in our local machine or not and whether that IIS working properly or not because sometimes IIS will not work properly even that IIS already installed in our local machine for that reason we need to check all these conditions before going to publish or deploy our website in local machine. 

C# Coding Standards and Best Programming Practices

Apr 26, 2010 31 comments


Anybody can write code. With a few months of programming experience, you can write 'working applications'. Making it work is easy, but doing it the right way requires more work, than just making it work.

Believe it, majority of the programmers write 'working code', but not ‘good code'. Writing 'good code' is an art and you must learn and practice it.

Everyone may have different definitions for the term ‘good code’. In my definition, the following are the characteristics of good code.

·         Reliable
·         Maintainable
·         Efficient

How to Merger the two datatbles into one table in asp.net

Apr 22, 2010 7 comments
It is very easy to merge two data tables into one table in asp.net 

Using Merge Method ucan add two tables

 DataTable dt = new DataTable();
 
DataTable dt1 = new DataTable();

dt.Merge(dt1);

 I think it helps you

Introduction to Object Oriented Programming Concepts (OOPS) in C#.net

Apr 16, 2010 502 comments
OOPS Concepts

Class:

 It is a collection of objects.

Object:

It is a real time entity.
An object can be considered a "thing" that can perform a set of related activities. The set of activities that the object performs defines the object's behavior. For example, the hand can grip something or a Student (object) can give the name or address. In pure OOP terms an object is an instance of a class

Set Color of GridLines in Gridview

4 comments
There are times when you will want to set the color of the grid lines in your GridView - however there is not to my knowledge a way of doing this declaratively. A workaround is to do this by tapping into the GridView's RowDataBound event.


First, set the OnRowDataBound property in the markup of the GridView:

OnRowDataBound="MyGrid_RowDataBound"

Second, set the color in the OnRowDataBound handler method:

protected void MyGrid_RowDataBound(object sender, GridViewRowEventArgs e)
    {

        foreach (TableCell tc in e.Row.Cells)
        {

            tc.Attributes["style"] = "border-color: #c3cecc";

        }

    }

Happy Coding

Setting up your ASP.NET server (IIS)

Apr 15, 2010 1 comments
  A guide that shows you how to install IIS server and configure it to work with ASP.NET, not just with ASP.

Before starting, be sure you have .NET Framework installed. If not, you can install it using Windows Update or download the package and install manually.

ASP runs inside IIS (Internet Information Services). Therefore first you should install IIS (under Windows 2000, Windows XP or Windows 2003), of course if it isn't already installed.
Usually, you can install it from Control Panel / Add or Remove Programs / Add/Remove Windows Components.

Go to Start Menu / All Programs / Administrative Tools / Internet Information Services.
Choose your computer name (local computer) / Web Sites / Default Web Site.
Right click 'Default Web Site' and select 'Properties'. Choose the 'Home Directory' tab and type in the 'Local Path' the path to where you want your files to be stored. For example 'D:\Server\iis'. This is the root of your webserver, this folder will open when you type http://localhost in your web broswer.
Below, check the 'Script source access', 'Read', 'Write' and 'Directory browsing' values. Click OK and now let's start the server.

Click on the 'Start item' button to start the service. Be sure you don't have any other server running on localhost, Apache for example.


Changing the Color of Selected item in menu using javascript

Apr 8, 2010 6 comments
In header Section you should write the this script function


<script language="javascript">
var selectEl = null; // keep track of currently selected
function mo(el) {
    if (selectEl) { // unselect selected
        selectEl.style.backgroundColor = 'gray';
        selectEl.style.border = '0px inset black';
    }
    selectEl = el; // new selected
    el.style.backgroundColor = 'navy';
}
</script>

© 2015 Aspdotnet-Suresh.com. All Rights Reserved.
The content is copyrighted to Suresh Dasari and may not be reproduced on other websites without permission from the owner.