Posts

Showing posts from November, 2011

Data Base Connection With Repeater

<%@ Import Namespace="System.Data.OleDb" %> <script  runat="server"> sub Page_Load dim dbconn,sql,dbcomm,dbread dbconn=New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;data source=" & server.mappath("/db/northwind.mdb")) dbconn.Open() sql="SELECT * FROM customers" dbcomm=New OleDbCommand(sql,dbconn) dbread=dbcomm.ExecuteReader() customers.DataSource=dbread customers.DataBind() dbread.Close() dbconn.Close() end sub </script> <html> <body> <form runat="server"> <asp:Repeater id="customers" runat="server"> <HeaderTemplate> <table border="1" width="100%"> <tr bgcolor="#b0c4de"> <th>Companyname</th> <th>Contactname</th> <th>Address</th> <th>City</th> </tr> </HeaderTemplate> <ItemTemplate> <tr bgcolor="#f0f0f0"> <td> <%#Conta...

Introduction of WPF

Image
Windows Presentation Foundation (WPF) is a next-generation presentation system for building Windows client applications with visually stunning user experiences. With WPF, you can create a wide range of both standalone and browser-hosted applications. WPF separates the appearance of an user interface from its behavior. The appearance is generally specified in the Extensible Application Markup Language (XAML), the behavior is implemented in a managed programming language like C# or Visual Basic. The two parts are tied together by databinding, events and commands. The separation of appearance and behavior brings the following benefits: Appearance and behaviour are loosely coupled Designers and developers can work on separate models. Graphical design tools can work on simple XML documents instead of parsing code. The core of WPF is a resolution-independent and vector-based rendering engine that is built to take advantage of modern graphics hardware. WPF...

How to get screen size like height and width

<Script language = JavaScript>              UserWidth = window.screen.width              UserHeight = window.screen.height              UserWidth = "Screen Width = " + UserWidth              UserHeight = " Screen Height = " + UserHeight              alert(UserWidth + UserHeight) </Script>

Create a back button on a page

<script type="text/javascript"> function goBack()   {   window.history.back()   } </script> <input type="button" value="Back" onclick="goBack()" />

Create Setup of Simple Web Application

Image
Introduction I noticed that there are several articles on using Web  Set up projects, but no articles could be found for  Window s  Set up projects. So I decided to share what I know about the VS  Window s Set up Projects. I will be using the  RunOnlyOnceCS.exe  demo  app  I  create d for another CodeProject article, as the  app lication we are creating the  set up for. Background Sooner or later, you need to  create  a  set up project for an  app lication. Personally, I am not a big fan of this type of distribution for an  app lication. Still it has its uses. Using a  set up project can be a good solution for a  Window s  app lication that has many dependencies on other assemblies / DLLs. The  set up will figure out what the dependencies are for the  app lication and automatically include them. Note : This does not include the .NET framework. Creating a  Set up Proj...