VS 2010 Add New Fields In Membership Table By Createuserwizard?
Dec 31, 2010I am trying to add new fields in membership table by using createuserwizrad control. is it possible to do that?
View 3 RepliesI am trying to add new fields in membership table by using createuserwizrad control. is it possible to do that?
View 3 RepliesIn addition to the fields defined in CreateUserWizard i want to add some more fields to store information in database for some purpose.But could not get the way to execute the task.
View 1 RepliesI'm using the ASP.NET Membership system to add new users to my site. It's working fine. But I'd like to force the user to enter additional required information (on a different aspx page) before they can successfully complete the registration process. What is the easiest way to direct and force the user to complete a different page of fields (stored in SQL in columns located on the same table as the basic membership fields) as a condition of completing the registration process?
In searching different sites, I see additional properties and templates like Wizard Steps, Continue button, Finish button---but I'm not clear as to which of these (perhaps none of them?) will allow me to accomplish this goal.
1) Extend the CreateUserWizard control to insert additional User fields (eg. Gender, Age, Occupation, Address, Phone, etc...).
OR
2) Create a brand new Custom Membership Provider of my own and skip using the inbuilt ASP.NET membership system.
What is the best way to create a new User system with my own tables of User data as described above?
Should i perhaps still use the standard ASP.NET membership system and then extend my own Registration page to add more User data to my own SQL backend table using the Identity value inserted into the aspnet_users table?
I am using the CreateUserWizard to create users in my new project (I am a complete newbie), but the wizard currently requires information from the user that is redundant for what I need. For example, I don't want security question & answer in my form, but I am not sure how to remove them. If I just remove the text fields, it says they are missing. I am pretty sure I know how to require further information, but I am not sure how to remove some of the defaults from the wizard. Removing the columns from the SQL server shouldn't be a problem.
So, I am looking for a place to edit which information it should gather (and removing some of the defaults) and the SQL insertion code so I don't gather information I will never need and use.
I am experimenting with the customization of the createuserwizard by creating textboxes for FirstName and Last Name. I have altered the web.config file to add the fields, but where does the actual data get stored? What C# code do I need to create, if any?
View 3 RepliesI am attempting to customise the CreateUserWizard by following it in my book, but when I come to reference them in code behind I get an error saying 'FieldName is not declared' for each field i'm adding, they are present in the page with the correct ID's, am I doing something wrong?I am only trying to add a firstName and lastName field to the bottom of the CreateUserWizard and remove the need to a security question.
View 1 RepliesI am using the CreateUserWizard in my VB.Net 3.5 web app. I added my own custom fields (First Name, Last Name...) to the form by using the CreateUserWizardStep and the CreateUserWizard1_CreatedUser event. Everything inserts fine into the aspnet_ tables and my own table. However, I cannot get the form validation to work. In other words, the form is ignoring the RequiredFieldValidators that I added.
View 4 RepliesI am using the createuserwizard but have also created my own database where the data will be stored NOT using the standard aspnetdb.
But i am getting checkschemaversion errors when registering the user. The thing is that the data actually gets stored in my own db even though error occurs.
I am using Membership createuser but how can i override this to use with my own db rather the aspnetdb where it requires all standard tables and stored procedures to be created
I need to clear the UserName and Email textbox fields in my CreateUserWizard.. Below is the code..
[Code]..........
I'm not familliar with the membership provider class. On my create user page I have the following code
[Code]....
If I want to add some fieds like phone number and address, how can I do it? And what happen to the following function if those fields are added.
[Code]....
Im a newbie to the world of ASP and C#, I have just created my first Registration form using the CreateUserWizard Membership Provider and set up the validators which work great, Appart from the "Username". If the user name is taken the page simply refreshes and no error appears would be realy greatfull if somone could point out where I might be going wrong. Here is my current code :
SCRIPT
protected void CreateUserWizard1_CreatedUser(object sender, EventArgs e)
{
/* User is created and setting extra parameters to profile */
[code]...
I want to create a user registration form, I used the CreateUserWizard control, and i intend to add more filed with the wizard interface, the fields were firstname,lastname, telephone all these with the textBox control and sex-male or female with a radioButton control, and upload photo with the FileUpload control.
After a successfull submit to the sql database, i should be able to retrieve all this informtion inluding the photo uploaded in another aspx page using any of the data control in y toolbox and resizein the photo to be 100/100 pixel size. pls could you write out the code (step by step details) to follow to implement all this in my asp.net 3.5 c# website. I have already created a table in my database, using userId as my ForeignKey.
I am using CreateUserWizard Control to register clients in my SQL Database. I have two tables: Customers and Categories. Customers CustomerID is a foreign key in Categoris. It is also automatically generated when values are inserted into Customers table.Categories tables receives values from CheckBoxList control as CatCodes. Everything works fine but one. When values are inserted into Customers and Categories table during registration, CustomerID is not inserted into the Categories table using the following sql code:
[Code]....
I have tested is in SQL management studio and it gives no error, which means code is correct. Also, following is my full code with code behind to better understand what is going on. It's been a week now I am struggling with this and can't understand why it is not inserting CustomerID into the Categories table. I need it to identify preferred categories for each client.
[Code]....
C# code behind:
[Code]....
If I am going to use the asp.net membership and roles, the asp.net database includes an aspnet_Users table that has the userid and email address. If I have custom fields is it best practice to maintain a separate usert table and link on user id or to add fields to the aspnet_Users table?
View 1 RepliesIs it possible to setup the CreateUserWizard to check for a duplicate entry in the aspnet_profile table (for a custom field) before the new user is created? For example, if I added a phone number field and wanted to make sure nobody else could create an account using that same phone number if a user already has an account with that phone number in the aspnet_Profile table's PropertyValuesString row?
View 10 RepliesI am modified CreateUserWizard Template to accept additional user information such as address, city, state and zip. I wanna store this additional data into a table i create call UserInformation. The table has UserId as it's primary key and it's also a foregin key to apsnet_Users. The tables also has an Address, city, state and zip column/field. I have an event that is called after a new User is Created and it is at this point where i wanna write the Address, City, State and Zip to the the database. What is the best way to write the data to the database..
[Code]....
I have created a basic website using ASP.net VB in order to display a diary of various user inputs to a website, I have created a register page, home page and once the user logs in it will direct them to a user logged in page where the diary entries that they have been created or been added to are displayed from the built in SQL database. I am trying to work with roles to ensure that when a certain login user is logged it will link them to a certain page (sort of like a basic admin page, but really its just to link to a page that only they can see).
I have used a session variable to take the username input and to display the diary entries they are linked to. How can I use another session variable to compare the role of the user that is logged in to allow me to direct them to the webpage that should link to their role. I have written code on the .aspx.vb that I thought would have worked, but it complies fine but doesn't work correctly. How can I write the code so that when the person inputs their details in, it would compare the username/password then to the role that they have been associated with in the database (these areas are all in the same table) that will then link to the webpage.
This is the error message I get on running the login page.Input string was not in a correct format.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.FormatException: Input string was not in a correct format.
Source Error:
Line 46:
Line 47:
Line 48: ElseIf Session("LoginRole") = ("Diary Owner") Then
Line 49:
Line 50: Response.Redirect("DiaryPage.aspx")
Code:
Sub LogBut(sender As Object, e As System.EventArgs) Handles LogButton.Click
Dim connection As New SqlClient.SqlConnection
Dim command As New SqlClient.SqlCommand
Dim adaptor As New SqlClient.SqlDataAdapter
Dim dataset As New DataSet
[code]...
Is it possible to use TextFieldParser and call .ReadFields and then use field name instead of field position?
For example, I have 40 columns in my .csv file.
field 0 = ID
field 1 = brand
field 2 = model
field 3 = price
field 4 = color
field 5 = something else.....
How the data would appear in the file:
ID,brand,model,price,color,somethingelse
1,Samsung,Galaxy S,200,black,xx
2,Samsung,Galaxy S II,300,black,xy
3,Samsung,Galaxy S III,500,black,xy
4,Samsung,Galaxy S III,500,white,xy
Right now I am calling the array like so CurrentRecord(4) which returns the color field value.
Can I call it like so, CurrentRecord("color") which would return the same value?
Code:
Dim afile As FileIO.TextFieldParser = New FileIO.TextFieldParser(sFullPath)
Dim CurrentRecord As String() ' this array will hold each line of data
afile.TextFieldType = FileIO.FieldType.Delimited
afile.Delimiters = New String() {","}
afile.HasFieldsEnclosedInQuotes = True
' parse the actual file
Dim iRow As Integer = 1
[Code] ....
I am trying to use the ASP Membership database, and I am having trouble getting the provider connected. I added the following to my Web.Config.
Code:
<membership defaultProvider="SqlMembershipProvider">
<providers>
<clear />
<add
name="SqlMembershipProvider"
type="System.Web.Security.SqlMembershipProvider"
connectionStringName="NewsletterSQLConnectionString"
/>
</providers>
</membership>
The connectionstring exists, and I am able to use it on the page to load and access a GridView control. In the Website Administration Tool, under Provider, and selecting 'Select a single provider for all site management data', I don't see any providers, indicating that this new provider is not loaded. If I remove the Clear, I do see the AspNetSqlProvider, however when I test it I get the error that it can not connect to the database.
I am using a custom membership provider. I needed to bind a repeater to a membershipusercollection but the only way I could think of was this:
There is no method to return a lcollection of membership users by userid. I basically have a friends table with a userid and a frienduserid field. both are foreign keys to the user table. So say I am userid 1 and I have two friends userid 2 and userid 3.
I needed to get a collection of membership users who are my friends (user 2 and 3)
So I did this:
Code:
Dim lstAccountIDs As List(Of Integer) = bl.GetFriendsAccountByUserID(iUser)
Dim mUsers As New MembershipUserCollection
For Each a In lstAccountIDs
mUsers.Add(Membership.GetUser(a))
Next
I get their id's and add them to to list(of Integer) then I loop through the list and get the particular user by id and add them to a membershipusercollection object.
I now need to add paging to my repeater control that uses that collection as a datasource. However the membership provider doesn't give me the ability to specify a pageindex or pagesize etc. It gives me those options in the GetAllUsers function but I need it to work in the above scenario.
I inherited a project whereby a website is utilizing the Membership Provider to allow for new account signups. This site utilizes different domains which point to the same root. In code, different pages are displayed based on which domain was used to connect to the site.
The Membership Provider sends an email confirmation to the end user upon account signup, based on (I'm guessing) some hard coded config value for that contains the From email address. Is there anyway to conditionally specify this From email address at run time? Or is it only possible to use a hard coded config value for this email address?
I am trying to integrate an existing asp.net application with sharepoint 2010. I would like to be able to have a logged in user on the application access a document library via an Iframe on the sharepoint 2010 site. I want to use FBA on sharepoint. Is it possible to share the membership database from the asp.net application with sharepoint? If not, what would be the best way to accomplish this?
View 1 RepliesI have asp.net Forms View.
I have three textboxes to lookup three different product codes from a product lookup table.
When you enter search criteria in a Textbox it would popup listbox control with Products and
when user selects the product it populates product-id back in to textbox.
I have lookup table and listbox working. However, My problem is I can't figure out how to pupulate TextBox2 if search Criteria was typed into TextBox2and to populate TextBox 3 if the search criteria was typed into textbox 3 etc.
I do not know if this can be done but lets say have a model like the one below:
I am trying to do this:
<%= Html.RadioButtonFor(model => model.B.height)%> -----> Does not work. Height is not a property
But B is a collection. How do I get access to the fields in table B in the View?
***********************************************************
Table A
Qid
name
age
Table B
Wid
Qid
gender
height