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

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>

Detect Browser Refresh to avoid events fired again in ASP.NET

Apr 6, 2010 21 comments

If you have created an aspx page using C# and ASP.NET and have put a button on it. And in the Click event of this button if you are inserting some data in database , after click if user refresh the page than click event gets fired again resulting data insertion to database again, to stop events on the page getting fired on browser refresh we need to write bit of code to avoid it.

In this example I’ve put a Label and a Button on the page, on click the label Text becomes Hello and when I refresh the page label's text again becomes Hello

Generating Random Number and String in C# or Generating the Password Automatically By using asp.net with c#

12 comments

Hi friends here I have written the code to generate the auto generated password 

open the visual studio 
select the new website

After that copy and paste the following code in aspx page

C# - Difference between Abstract class and Interface in Asp.Net

56 comments
In previous article I explained complete OOPS Concept. Now I will explain differences between Abstract classes and Interfaces.

An Abstract class without any implementation just looks like an Interface; however there are lot of differences than similarities between an Abstract class and an Interface. Let's explain both concepts and compare their similarities and differences.

What is an Abstract Class?

An abstract class is a special kind of class that cannot be instantiated. So the question is why we need a class that cannot be instantiated? An abstract class is only to be sub-classed (inherited from). In other words, it only allows other classes to inherit from it but cannot be instantiated. The advantage is that it enforces certain hierarchies for all the subclasses. In simple words, it is a kind of contract that forces all the subclasses to carry on the same hierarchies or standards.

Maintaining State of CheckBoxes While Paging in a GridView Control

Apr 3, 2010 36 comments
Introduction:
In this article I will explain how to maintain state of selected checkboxes during paging in gridview using asp.net
Description:

I have one gridview with checkboxes and it contains lot of data for that reason I applied paging for gridview and displaying 8 records per page. After apply the paging in gridview if I select checkboxes in first page and moving to another page and select some checkboxes in second page after that if I come back I am unable to see the previous selected values. At that time I know one new thing that is gridview won’t maintain the state of controls during postback for that reason we need write some code to maintain the previous selected values in gridview. Before seeing the code implemention first Design your aspx page like this

how to Create RSS feed Using Asp.net | RSS Feed Sample using asp.net

26 comments
Introduction:

Here I will explain how to create RSS feed using asp.net.

Description:

RSS stands for "Really Simple Syndication". RSS solves a problem for people who regularly use the web. It allows you to easily stay informed by retrieving the latest content from the sites you are interested in. You save time by not needing to visit each site individually.

how to import Contacts from GMAIL using ASP.NET and C#

Apr 2, 2010 64 comments
Introduction:

In this article I will explain how to import gmail contacts of a user by using GContacts Data API provided by Google.

Description:

We have developed one social network site at that time we think that how to popularize the our social network site I have checked some of social network sites at that time we got idea to implement import contacts concept is best to intimate all of our friends at a time I have searched so many websites to implement this concepts but no result finally I have implemented import contacts from gmail 

© 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.