EMAIL SUBSCRIBER
This is not just a form at all. This is the entire compiled dll which will add a
new user to your database. It validates that a user with the same Email address
does not already exist and it ensures that the email address is validated as a
correct address before it inserts the address as a string ito the database.
How to use it:
This component can be put on your toolbox and dragged onto the web page (aspx).
It represents a simple form, where viewers can submit their email address and
their address gets added to your database. You can then use this data to send
them email messages.
This form works with an Access database (mdb) file. You must have a database and
you must:
-
Know the table name of the database where the email addresses is to be added.
-
Know the field (column) name in which the email address is to be inserted.
-
The table must not contain any fields that do not permit null values except for
the Primary key field (column).
-
The primary key field (column) must be an auto number (auto increment).
-
All of the table’s fields (columns) other than the primary auto number key
field where this email does not get inserted must allow null values, otherwise
the database will raise an Exception. It will insist that other field (column)
values must be inserted as well and this component has only been designed to
add an email address into one field containing a varchar data type.
We have added a test.mdb file with this application. So if you experience any
difficulties, you can check out if your database is correct by using our test
database file. In this case the database name is test.mdb, the table name is
Subscribers and the field name is Email. You must set the Properties in the
Properties browser accordingly.
You must set in the Properties Browser the path to the database. The path is
from where the parent page of this component resides. For example if the
component is dragged onto a page named mypage.aspx and is in a directory that
has a sub directory with the name (folder name databases) and the database file
is named test.mdb, then the Property box in the component browser for the
database directory is set to databases\test.mdb.
You will find that there is another Property for alternative database path. This
is advantageous if you have a different path in your test environment than on
the real web server. If it cannot find the database, rather than raising an
exception it will look into the alternative path and name and if it finds it
there it will use it.
You can also insert a top image if you like. There are many property fields in
the Object browser to provide a rich variation of appearance.
This form will save you hours of hard work.
You can try it out as the sample below is not an image but a true sample of the
component.
On
your left you see this component in action. Remember that you can add a top
image to it and configure its looks completely differently from the way we have
done it. You can try it out, you would add an email address to our database
(don't worry, you are not subscribing to us as this is only for the purpose of
testing).
To download this component click here.
.