Friday, March 30, 2012

.NET Sample Projects with Source Code

Academic Projects for Students
  • Browse through projects and download source code

  • Register as a project trainee under any project

  • Post questions and get answers from experienced project guides

  • Develop the project yourself, submit and get project completion certificate from dotnetspider.


General .NET Projects

please visit:

http://www.dotnetspider.com/projects/index.aspx?


http://all-free-download.com/free-website-templates/business_553.html

Display Microsoft Excel File in ASP.NET GridView


Microsoft Excel is still very powerful and widely used tool in almost all the companies. Many people use it extensively to store and analyze tabular data without learning a relational database management system such as SQL Server or Oracle. If you are creating ASP.NET website, there are chances that the data is made available to you in an Excel file and reading and displaying Excel data in ASP.NET page can make your applications more powerful for analysis. In this tutorial I will show you how to read Excel file and displaying data in ASP.NET GridView control. 
For the purpose of this tutorial, I have created a sample Excel sheet “SearchEngines.xls” that holds the records of different search engines. Make sure you have saved this file in your ASP.NET website special folder named App_Data so that we can interact with it from ASP.NET page without worrying about its absolute path.


Sample Excel File

Next I have created ASP.NET page which is very straight forward with only one Button and GridView control on it. Following is the HTML source for the (.aspx) file.
<form id="form1" runat="server">
   <asp:button id="Button1" runat="server" onclick="Button1_Click" text="Display Excel Data" />
   <br>
   <br>
   <asp:gridview id="GridView1" runat="server" cellpadding="6" gridlines="None"
        bordercolor="#336699" borderstyle="Solid" borderwidth="1px">
       
        <headerstyle backcolor="#336699" font-bold="True" forecolor="White" />
   </asp:gridview>
</form>

In the C# code of the button Click event I will connect and read Excel file and then I will bind the data to GridView control. To connect Excel file you need to use Microsoft Jet OLEDB data provider as you can see from the following connection string. The path of the excel file is provided by using ASP.NET DataDirectory feature which points to the App_Data folder in your Website.
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|SearchEngines.xls;Extended Properties='Excel 8.0;HDR=Yes;'
You can make sure of the OLEDB data provider to treat the Excel file as a data source. Where Excel Workbook can be assumed as the Database and the sheets in the Workbook are considered as tables. In this way, you can fire SQL queries to the Excel file to retrieve data from the sheets. Following code shows you how to connect and read data from Excel using OleDbDataAdapter class available in System.Data.OleDb namespace.
string strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|SearchEngines.xls;Extended Properties='Excel 8.0;HDR=Yes;'";

string query = "SELECT * FROM [Sheet1$]";

DataSet excelDataSet = new DataSet();
OleDbDataAdapter da = new OleDbDataAdapter(query, strConn);

da.Fill(excelDataSet);

GridView1.DataSource = excelDataSet;
GridView1.DataBind();

The output of the above code can be shown below.

Excel Data Displaying in GridView

I hope this tutorial will help many of you specially those who are new in ASP.NET and want to connect Excel from ASP.NET page. 

Wednesday, March 28, 2012

Lots of Free Skins for DotNetNuke

Each week we're releasing more free skins into our collection.  All of these skins are available at no charge exclusively to DNNCreative Subscribers.
for details please visit:
http://www.dnncreative.com/TrainingTutorials/SkinningTutorials/14FreeSkinsforDotNetNuke/tabid/640/Default.aspx

Monday, March 26, 2012

A online auction Project developed in asp.net


A online auction Project developed in asp.net with visual studio 2010 you can download the free source code Leave your email id. First thing this is not fully developed Project You need to work on it but you can get basic idea how to start and how to work on it.
for download source code please visit:

Tuesday, March 20, 2012

Ajax ModalPopUpExtender Example to edit the gridview row values in asp.net

Ajax ModalPopUpExtender Example to edit the gridview row values in asp.net

Here I will explain how to show the modal popup using Ajax ModalPopupExtender to edit Rows in a GridView using asp.net.

Description:

In my previous post I explained clearly how to show the gridview images with lightbox effect. Same way we can display popup using Ajax futures. In ajax we have ModalPopup extender to display data in Popup here I am doing sample to show pop up whenever user clicks on Edit button in gridview at that time I will display that particular gridview row data into Modal popup for that First design table in your database like this

for details and download projects:please visit

http://www.aspdotnet-suresh.com/2011/03/how-to-show-modalpopup-to-edit-gridview.html

 

POPUP WITH VALIDATIONS

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Test POPUP</title>
    <link id="css" href="styles_w.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <div id="right" align="center">
            <div class="right_s">
                <br />
                <h2>
                    Test Register System</h2>
                <br />
                <br />
                <h3 style="color: #0066FF">
                    Here is Registration Page ...
                </h3>
                <br />
                <h4 align="center" style="color: #0066FF">
                    Please Click Next to Begin!</h4>
                <br />
                <asp:Button ID="registerLink" runat="server" Text="NEXT ... !" CssClass="gen_button" />
                <asp:Panel ID="SignupPanelOuter" runat="server" CssClass="outerPopup" Style="display: none;"
                    Width="410px" Height="350px">
                    <asp:Panel ID="SignupPanelInner" runat="server" CssClass="innerPopup" Width="410px"
                        Height="350px">
                        <div style="height: 350px; width: 400px">
                            <table style="width: 400px">
                                <tr>
                                    <td align="left">
                                        <img src="Images/register.gif" alt="Register Here" height="30px" width="30px" /></td>
                                    <td valign="middle">
                                        <h3>
                                            Welcome To test</h3>
                                    </td>
                                    <td align="right">
                                        <asp:ImageButton ID="ImageButton1" ImageUrl="Images/150px-Crystal_button_cancel.svg.png"
                                            ImageAlign="Right" runat="server" CausesValidation="false" Height="20px" Width="20px"
                                            OnClick="sigUpCancel_Click" /></td>
                                </tr>
                                <tr>
                                    <td colspan="3" valign="middle">
                                        <hr style="width: 400px" />
                                    </td>
                                </tr>
                                <tr>
                                    <td valign="middle" style="width: 100px">
                                        <asp:Label ID="name_lbl" runat="server" Text="User Name" Width="100px"></asp:Label></td>
                                    <td valign="middle" style="width: 130px">
                                        <asp:TextBox ID="name_txt" runat="server" Width="130px"></asp:TextBox></td>
                                    <td valign="middle" style="width: 120px">
                                        <asp:RequiredFieldValidator ValidationGroup="client" ID="RequiredFieldValidator1"
                                            runat="server" ErrorMessage="Enter Name" ControlToValidate="name_txt"></asp:RequiredFieldValidator>
                                        <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender2" runat="server" FilterType="Custom, UppercaseLetters,LowercaseLetters"
                                            ValidChars=" " TargetControlID="name_txt">
                                        </cc1:FilteredTextBoxExtender>
                                    </td>
                                    <tr>
                                        <td colspan="3">
                                        </td>
                                    </tr>
                                <tr>
                                    <td valign="middle" style="width: 100px">
                                        <asp:Label ID="gender_lbl" runat="server" Text="Gender M/F" Width="100px"></asp:Label></td>
                                    <td valign="middle" style="width: 130px">
                                        <asp:RadioButtonList ID="gender_RadioButtonList" runat="server" Height="16px" Width="44px"
                                            RepeatDirection="Horizontal">
                                            <asp:ListItem>M</asp:ListItem>
                                            <asp:ListItem>F</asp:ListItem>
                                        </asp:RadioButtonList></td>
                                    <td valign="middle">
                                        <asp:RequiredFieldValidator ValidationGroup="client" ID="genderValidator"
                                            runat="server" ErrorMessage="Select gender" ControlToValidate="gender_RadioButtonList"></asp:RequiredFieldValidator>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="3">
                                    </td>
                                </tr>
                                <tr>
                                    <td valign="middle" style="width: 100px">
                                        <asp:Label ID="Label1" runat="server" Text="User ID" Width="100px"></asp:Label>
                                    </td>
                                    <td valign="middle" style="width: 130px">
                                        <asp:TextBox ID="userid_txt" runat="server" Width="130px"></asp:TextBox></td>
                                    <td valign="middle" style="width: 120px">
                                        <asp:RequiredFieldValidator ValidationGroup="client" ID="RequiredFieldValidator2"
                                            runat="server" ErrorMessage="Enter userid" ControlToValidate="userid_txt"></asp:RequiredFieldValidator>
                                        <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender3" runat="server" FilterType="Custom, UppercaseLetters,LowercaseLetters,Numbers"
                                            ValidChars=" " TargetControlID="userid_txt">
                                        </cc1:FilteredTextBoxExtender>
                                    </td>
                                </tr>
                                <tr>
                                    <td valign="middle" style="width: 100px">
                                        <asp:Label ID="Label4" runat="server" Text="Contact #"></asp:Label></td>
                                    <td valign="middle" style="width: 130px">
                                        <asp:TextBox ID="contact_txt" runat="server" Width="130px"></asp:TextBox></td>
                                    <td valign="middle" style="width: 120px">
                                        <asp:RequiredFieldValidator ValidationGroup="client" ID="RequiredFieldValidator4"
                                            runat="server" ErrorMessage="Enter Contact Number" ControlToValidate="contact_txt"></asp:RequiredFieldValidator>
                                        <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender4" runat="server" FilterType="Custom,Numbers"
                                            ValidChars="+,-" TargetControlID="contact_txt">
                                        </cc1:FilteredTextBoxExtender>
                                    </td>
                                </tr>
                                <tr>
                                    <td valign="middle" style="width: 100px">
                                        <asp:Label ID="Label5" runat="server" Text="Email ID"> </asp:Label></td>
                                    <td valign="middle" style="width: 130px">
                                        <asp:TextBox ID="email_txt" runat="server" Width="130px"></asp:TextBox></td>
                                    <td valign="middle" style="width: 120px">
                                        <asp:RequiredFieldValidator ValidationGroup="client" ID="RequiredFieldValidator5"
                                            runat="server" ErrorMessage="Plz Enter Email ID" ControlToValidate="email_txt"></asp:RequiredFieldValidator>
                                        <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender5" runat="server" FilterType="Custom, UppercaseLetters,LowercaseLetters,Numbers"
                                            ValidChars="-,_,., @" TargetControlID="email_txt">
                                        </cc1:FilteredTextBoxExtender>
                                    </td>
                                </tr>
                                <tr>
                                    <td valign="middle" colspan="2">
                                        <asp:Label ID="error_lbl" runat="server" Text=" " Font-Bold="True" ForeColor="Red"></asp:Label></td>
                                    <td valign="middle">
                                        <asp:Button ID="signUp_btn" ValidationGroup="client" runat="server" Text="Sign Up" CausesValidation="true"
                                            CssClass="gen_button" OnClick="signUp_btn_Click" /></td>
                                </tr>
                            </table>
                        </div>
                    </asp:Panel>
                </asp:Panel>
                <cc1:ModalPopupExtender ID="ModalPopupExtenderSignUp" runat="server" TargetControlID="registerLink"
                    PopupControlID="SignupPanelOuter" BehaviorID="ModalPopupExtenderSignUp" BackgroundCssClass="modalBackground"
                    DropShadow="true" />
                <cc1:RoundedCornersExtender ID="RoundedCornersExtender2" runat="server" BehaviorID="RoundedCornersExtender2"
                    TargetControlID="SignupPanelInner" BorderColor="black" Radius="8" />
            </div>
        </div>
    </form>
</body>
</html>

Wednesday, March 14, 2012

Link button in html

<asp:LinkButton ID="btnAddExt" runat="server" OnClick="LinkButton1_Click">Add Customer</asp:LinkButton>&nbsp;&nbsp;

  protected void LinkButton1_Click(object sender, EventArgs e)
        {
            try
            {
                Session["DVMode"] = MessageConstants.GeneralConstants.Insert;
                Response.Redirect("AddCustomer.aspx");
            }
            catch (Exception ex)
            {
                Logger.WriteException(ex);
            }
        }

Tuesday, March 6, 2012

Telerik Reporting Telerik Reporting Q1 2012

To create even simple reports you start by creating a class library to contain your report and a web, windows or Silverlight application to display the report.
visit:http://www.telerik.com/help/reporting/quick-start-create-simple-report.html

How to Block Others Facebook's Account

 Facebook is a social networking no.1 in Indonesia which have users more than 175 million worldwide, and the 3rd most common site which opened by Internet users in Indonesia. The problem is lack of privacy due to social networks in our activities. for example you want to restrict certain things just for a few among the people. Or you troubled by someone who continues to haunt your facebook such as ex-girlfriend, secret admire, and spammers who always monitor your facebook and do not want to lose a bit of information that happens to you on facebook.

Thursday, March 1, 2012

Online Mobile shop in ASP.NET


E-commerce is one of the largest driving forces behind the Internet. Even in the Internet’s earliest
days, many sites featured a shop where you could order products and have them shipped to your
home. With the advent of server-side techniques, such as ASP and ASP.NET, it has been much easier
and cheaper for smaller sites to offer their products and services online. Despite the large diversity
in the goods these sites offer, they all have one thing in common. To allow customers to select the
products they want to order, they all feature a product catalog and a shopping cart where products
are stored during the shopping process. At checkout time, these products are taken from the cart
and usually stored in a database so the order can be processed later. The Online Mobile Shop is no
exception; this chapter shows you how to create a web shop with a shopping cart in ASP.NET 2.0.
The chapter starts off with a quick tour of the Online Mobile Shop from an end-user’s point of view. It guides you through the process of browsing articles and adding them to a shopping cart, and shows you
how the shopping cart is saved in the database as an order. Finally, this chapter also explains how
you can manage the product catalog for the Online Mobile Shop.

Finally, Download this sample template please visit:
http://www.dotnetspider.com/projects/1215-Online-Mobile-shop-ASP-NET.aspx