PC Review


Reply
Thread Tools Rate Thread

Hoping somebody can help me

 
 
Tastic
Guest
Posts: n/a
 
      20th Jan 2007
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.SqlDataSourceSelectingEventArgs)

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>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
hoping and hoping cyatore Microsoft Word Document Management 0 21st Apr 2010 11:47 AM
hoping for help handsomecreep@yahoo.com Microsoft Excel Programming 1 9th May 2007 09:23 PM
Hoping someone can help joet5402 Microsoft Access Forms 1 15th Apr 2007 08:17 PM
Hoping joseph_m_kaiser@yahoo.com Microsoft Excel Programming 1 24th Aug 2006 02:38 AM
Hoping some one can help me Tastic Microsoft Access 1 6th Aug 2006 07:25 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:51 PM.