Extending Web.Matrix Registration Page

Results 1 to 2 of 2

Thread: Extending Web.Matrix Registration Page

  1. #1
    Join Date
    Dec 1969

    Default Extending Web.Matrix Registration Page

    Hi guys, <BR><BR>I&#039;m still trying to come to grips with ASP.NET and i&#039;m playing around with Web.Matrix. So far i&#039;ve managed to create this example no problems:<BR><BR>http://www.asp.net/webmatrix/tour/section9/createregpage.aspx<BR><BR>On my application i&#039;ve changed the page a bit to also insert an email address. Which is inserting no problems. <BR><BR>However I now want to be able to stop the insert of a users details if an email address like the one the user has entered already exists. Does anyone know how to achieve this in .net? <BR><BR>In class ASP I would do something like this:<BR><BR>&#060;%<BR>Dim RS<BR>Set RS=Server.CreateObject("ADODB.recordset")<BR>Set RS = conn.Execute ("SELECT Emailaddress FROM TempCandidate where Emailaddress = &#039;" & FixSQL(Trim(Request("sEmail"))) & "&#039;;")<BR>if RS.EOF = False Then<BR>Response.Write ("Email already registered")<BR>Response.End<BR>End if<BR>%&#062;<BR><BR>I&#039;ve been playing around trying to put this into a sub in the Web.Matrix page and I keep getting errors?<BR><BR>Can anyone help?<BR><BR>Cheers<BR><BR>James

  2. #2

    Default RE: Extending Web.Matrix Registration Page

    I only took a quick look, but you should probably add a WHERE clause to the INSERT statement in AddUser()

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts