Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6920151
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:06:40+00:00 2026-05-27T10:06:40+00:00

Partial Class Registration_SchoolRegistration Inherits System.Web.UI.Page Protected Sub CreateUserWizard1_CreatedUser(sender As Object, e As System.EventArgs) Handles

  • 0
Partial Class Registration_SchoolRegistration
    Inherits System.Web.UI.Page

    Protected Sub CreateUserWizard1_CreatedUser(sender As Object, e As System.EventArgs) Handles CreateUserWizard1.CreatedUser

        Try
            Dim UserNameTextBox As TextBox = DirectCast(CreateUserWizardStep1.ContentTemplateContainer.FindControl("UserName"), TextBox)
            Dim PrincipalEmail As TextBox = DirectCast(CreateUserWizardStep1.ContentTemplateContainer.FindControl("Email"), TextBox)
            Dim DataSource As SqlDataSource = DirectCast(CreateUserWizardStep1.ContentTemplateContainer.FindControl("SchoolInfo"), SqlDataSource)
            DataSource.InsertParameters.Add("TimeStamp", DateTime.Now)
            DataSource.InsertParameters.Add("PrincipalUserName", UserNameTextBox.Text.ToString)
            DataSource.InsertParameters.Add("PrincipalEmail", PrincipalEmail.Text.ToString)
            DataSource.Insert()

        Catch ex As Exception
            MsgBox(ex.Message.ToString)
        Finally

        End Try

    End Sub

End Class

Given Above is the code snippet i am using to store additional data to the DB.Is there any way i can revoke the registration if anything goes wrong??

I mean suppose the data entered is not in correct format or something bad happens at the server side..i do not want the user to get registered..or say i want to DE-register the user,so that he/she can register again on the site using the same credentials.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T10:06:41+00:00Added an answer on May 27, 2026 at 10:06 am

    You could delete the user if something fails:

    Dim cuw As CreateUserWizard = DirectCast(sender, CreateUserWizard)
    ' following is a function that inserts the user etc and returns a statuscode '
    Dim insertStatus As Int32 = AddUser()
    If insertStatus = 0
        Membership.DeleteUser(cuw.UserName)
    End If
    

    http://forums.asp.net/t/1496773.aspx/1

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Imports System.Net.Mail Partial Class ContactUs Inherits System.Web.UI.Page Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal
Partial Class ClientCenter_UpdateSub Inherits System.Web.UI.Page Structure PInfo Dim Name As String Dim Surname As
Partial Class Preferences_MyPreferences Inherits System.Web.UI.Page Dim userID As String = Session(UserID) This is just
My master page: public partial class MasterPages_Main : System.Web.UI.MasterPage { public bool IsLoggedIn; protected
In the following master.cs code: public partial class Default : System.Web.UI.MasterPage { protected void
public partial class Form1 : Form { string[] id; private void button_Click(object sender, EventArgs
public partial class Stats : System.Web.UI.Page { public SqlDataReader DataReader; public SqlCommand Command; string
public partial class About : System.Web.UI.Page { public class Class2 { public int i
public partial class Table_Traversing : System.Web.UI.Page { Table table1 = new Table(); TableRow table_row1
The code public partial class Table_Traversing : System.Web.UI.Page { Table table1 = new Table();

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.