SECTIONS
 LATEST
 RANDOM
 COMMENTS
:ki ... Read More

:p ... Read More

NI ce 1 :ki ... Read More

paste app file in ur ... Read More

what to do with app ... Read More

ya jazz i ... Read More

Keep putting such ar ... Read More

Good basic tutorial, ... Read More

oye kithey hai :lol ... Read More

:o ... nice topic ... Read More
 ADS
 Welcome To The "G-Force" !!
Logo

G-Force is the next incarnation of The Mypaaji Group that has been providing FREE Source to many Tips, Tutorials since 2006.

Our only intent is assist people with their problems Related to Programming or Computers and to educate anyone wishing to learn about.

We will at no time charge anyone for the help we provide.

We love to share Quality Information and that is why we are up here... Hope you enjoy this site.

Some Latest Uploads
 DISPLAYING RECORDS FROM AN EXCEL DATABASE

Displaying Records From An Excel Database

Aim of this articles is to display records from an Microsoft Excel in an ASP. We could use general SQL command while retreving data from an excel sheet. All we need to know how to connect Excel file.

Here is the excel database connection string :

Connection String for Excel

strConnection = "DBQ=" & Server.MapPath("customer-list.xls") & "; DRIVER={Microsoft Excel Driver (*.xls)};"

We will use a specific driver to connect to Excel files. ODBC plays a major role in coding.

An Example :


strConnection = "DBQ=" & Server.MapPath("customer-list.xls") & "; DRIVER={Microsoft Excel Driver (*.xls)};"

Set cn = Server.CreateObject("ADODB.Connection")
Set rs = Server.CreateObject("ADODB.Recordset")
cn.open strConnection


sql="select * from sales_in_2005;"

rs.Open sql, cn, adOpenStatic, adLockPessimistic


do while not rs.eof
response.write rs("customerName") & " : " & rs("soldPrice") & "<br/>"
rs.movenext
loop


rs.close
Set rs = nothing
cn... See Full Content
Posted by - sunny     On - Friday, February 08, 2008     Comments - 0
 ASP AND THE ERROR HANDLER

ASP and the Error Handler

Introduction

ASP pages are so easy to put together that sometimes developers have not thought through the problems associated with errors. Error handling can help your application to be more robust. I have often come across commercial sites written in ASP that fail to have any sort of error handling.

Types of Error

There are 3 main types of errors:

* Compile-time errors
These errors are usually in the syntax of the code and stop the ASP from compiling. You may have experienced this if you left the closing ”Next” statement off of a “For” loop.
* Runtime errors
These happen when you try to execute the ASP page. For example, if you try setting a variable outside its allowed range.
* Logic errors
Logic errors are harder to detect. The problem lies within the structure of the code, and the computer cannot detect an error. These types require thorough testing before rolling out the application.

As compile-time errors are alway... See Full Content
Posted by - sunny     On - Sunday, January 13, 2008     Comments - 2
 SENDING EMAIL IN ASP.NET

Sending Email in ASP.NET

Something found on every web page today is an email form of some sort. In all probability this will not change anytime soon, therefore I will demonstrate today how to send email via ASP.NET: from plain to HTML mail and attachments.

The use of the source code in this article requires an installation of Microsoft's .NET Framework SDK on a Web server. I also assume a certain familiarity of the reader with the C# programming language.
The quickest way

There always is a way that can be classified under the heading 'Quick and Dirty'. And I again want to begin with this way because we can test the server configuration quite easily without having to take any side effects into consideration (SimpleMail.aspx).

<% @Page Language="C#" %>
<% @Import Namespace="System.Web.Mail" %>
<%
string strTo = "sunny@g-force.Com";
string strFrom = "you@you.com";
string strSubject = "Hi sunny";

SmtpMail.Send(strFrom, strTo, strSubject,
"A real nice body text here");

Response.Write(... See Full Content
Posted by - sunny     On - Wednesday, January 09, 2008     Comments - 0
 LOGIN PAGE IN ASP

Login Page In ASP

So, how do you start?

The first thing you need to do is create a simple login page, which can look something like this:
Note: This will create JUST a form with text boxes. You can pad it out yourself.
Creating the login.asp page

<% Sub ShowLogin %>
<form name=form1 action=login.asp method=post>
User Name : <input type=text name=username>
Password : <input type=password name=userpwd>
<input type=hidden name=login value=true>
<input type=submit value="Login">
</form>
<% End Sub %


The second input box has a type=password, what this does is cause the text typed in to be hidden (like *******). Also to note is that you want the action of the form to be the same page. This way we do not need a second page just to handle the checking of the password. I will talk about the hidden form element next. You will also see why we placed the form inside a subroutine later.

Before we add the code to check to see if the user name and password are correct we need... See Full Content
Posted by - sunny     On - Monday, January 07, 2008     Comments - 0




© 2008 G-Force.Mypaaji.Com