473,385 Members | 2,005 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Hoping somebody can help me

Hi, and thanks in advance.

I am currently creating a registration page that links to an access
database, I am using Visual Studio 2005 Express

I have created an Access datasource and bound it to the fields with in
my form, and when I click submit it inserts the data into the database,
I have got that far

My problem is that after insertion the page remains on the registration
page. I need it to redirect to a new page, I have tried calling
response.redirect("URL"), and that works too.... but it will only let
me do one or the other, when I add the response.redirect it redirects
to the page with out inserting the data
so far the relavant coding on the page looks like this:

<%@ Page Language="VB" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">
Protected Sub MemberRegistration_Selecting(ByVal sender As Object,
ByVal e As System.Web.UI.WebControls.SqlDataSourceSelectingEv entArgs)

End Sub

Protected Sub CustomValidator1_ServerValidate(ByVal source As
Object, ByVal args As
System.Web.UI.WebControls.ServerValidateEventArgs)

End Sub

</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Register Now</title>
</head>
<body bgcolor="#B1B19B">
<form name="Registration" action="ConfirmRegistration.aspx" method=post
runat="server">
<asp:AccessDataSource ID="MemberRegistration" runat="server"
OnSelecting="MemberRegistration_Selecting"
DataFile="~/Database/Business System.mdb" InsertCommand="INSERT INTO
Members(EmailAddress, [Password], FirstName, LastName, DateOfBirth)
VALUES (@EmailAddress, @Password, @FirstName, @LastName, @DateOfBirth)"
SelectCommand="SELECT [FirstName], [LastName], [EmailAddress],
[DateOfBirth] FROM [Members] WHERE ([EmailAddress] = ?)">
<SelectParameters>
<asp:FormParameter FormField="EmailAddress" Name="?" />
</SelectParameters>
</asp:AccessDataSource>
<asp:FormView ID="FormView1" runat="server" DefaultMode="Insert"
DataSourceID="MemberRegistration" Height="122px">
<InsertItemTemplate>
<table>
<tr>
<td style="width: 131px">
Email Address:</td>
<td style="width: 100px">
<asp:TextBox ID="EmailAddress" runat="server"
Text='<%# Bind("EmailAddress") %>'></asp:TextBox></td>
<td style="width: 194px">
<asp:RequiredFieldValidator ID="EmailValidate"
runat="server" ControlToValidate="EmailAddress"
ErrorMessage="You must enter an email
address">*</asp:RequiredFieldValidator></td>
</tr>
<tr style="color: #000000">
<td style="width: 131px">
Password:</td>
<td style="width: 100px">
<asp:TextBox ID="Password" runat="server"
Text='<%# Bind("Password") %>'></asp:TextBox></td>
<td style="width: 194px">
<asp:RequiredFieldValidator ID="PSWDVAL"
runat="server" ControlToValidate="Password"
ErrorMessage="Please Supply
Password">*</asp:RequiredFieldValidator></td>
</tr>
<tr style="color: #000000">
<td style="width: 131px">
Confirm Password:</td>
<td style="width: 100px">
<asp:TextBox ID="PasswordConfirm"
runat="server"></asp:TextBox></td>
<td style="width: 194px">
<asp:CompareValidator ID="PSWDCOMP"
runat="server" ControlToCompare="PasswordConfirm"
ControlToValidate="Password"
ErrorMessage="Passwords must match"></asp:CompareValidator></td>
</tr>
<tr style="color: #000000">
<td style="width: 131px">
First Name:</td>
<td style="width: 100px">
<asp:TextBox ID="FirstName" runat="server"
Text='<%# Bind("FirstName") %>'></asp:TextBox></td>
<td style="width: 194px">
<asp:RequiredFieldValidator ID="FNVal"
runat="server" ControlToValidate="FirstName"
ErrorMessage="Please Enter First
Name">*</asp:RequiredFieldValidator></td>
</tr>
<tr>
<td style="width: 131px">
Last Name:</td>
<td style="width: 100px">
<asp:TextBox ID="LastName" runat="server"
Text='<%# Bind("LastName") %>'></asp:TextBox></td>
<td style="width: 194px">
<asp:RequiredFieldValidator ID="LNVAL"
runat="server" ControlToValidate="LastName"
ErrorMessage="Please Enter Last
Name">*</asp:RequiredFieldValidator></td>
</tr>
<tr>
<td style="width: 131px">
Date Of Birth:</td>
<td style="width: 100px">
<asp:TextBox ID="DateOfBirth" runat="server"
Text='<%# Bind("DateOfBirth") %>'></asp:TextBox></td>
<td style="width: 194px">
<asp:RequiredFieldValidator ID="DOBVAL"
runat="server" ControlToValidate="DateOfBirth"
ErrorMessage="Please Enter Date Of
Birth">*</asp:RequiredFieldValidator></td>
</tr>
</table>
<br />
<asp:Button ID="Insert" OnClick="Submit" runat="server"
Text="Submit" CausesValidation="true"/>
</InsertItemTemplate>

Jan 20 '07 #1
0 976

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: R. Tarazi | last post by:
Hello together, I'm having extreme difficulties using RegExps for a specific problem and would really appreciate any help and hope somebody will read through my "long" posting... 1. <?php...
3
by: Patrick | last post by:
Hi, I managed to open a msaccess database with python. import win32com.client.dynamic db1 = win32com.client.dynamic.Dispatch("Access.Application") dbname =...
0
by: Pola | last post by:
Please Help I am using VC++ in win 2000 In my appl (Win32 project) I want to control the close operation of the apl (for example if somebody will try to close appl from the "Windows Task Manager")...
0
by: Jai | last post by:
Hi, Somebody please tell me how to bind(two way) a checkboxlist with objectdatasource if the checkboxlist is inside a formview..... Code of FormView is like this::--- <asp:FormView...
11
by: yangsuli | last post by:
i want to creat a link when somebody click the link the php script calls a function,then display itself :) i have tried <a href=<? funtion(); echo=$_server ?>text</a> but it will call the...
14
by: cool.vimalsmail | last post by:
i dont know how to convert a txt file into a zip file (i.e.,)i have a file named packages and i want the packages file with a ".gz" extension by implementing a python program
2
by: Tin | last post by:
I bought a laptop and burned 4 recovery CDs for recovery purpose. Instead of burning as disc images, I just copied and pasted these 4 CDs to my USB HDD as 4 folders called "RecoveryCD 1",...
3
by: Syoam4ka | last post by:
Hi, I want to change the backcolor of my button every second ,for example red, after a second blue, after a second re, then blue and so on...i need it in a web form not in a windows form(in winform...
5
by: Sunfire | last post by:
Can somebody put this code into c#? Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim imageFolder As String Dim imageText As String Dim bm As...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.