login control and signup

Last post 04-15-2008 2:18 PM by anas. 6 replies.

Sort Posts:

  • login control and signup

    04-14-2008, 7:29 AM
    • Loading...
    • nicemanish
    • Joined on 04-01-2008, 4:20 PM
    • Posts 14

    i want to use login control and signup form in my application but in sign up form i want to customized it more fields like country,state,city.. and so on.how i do that? for that i have to change the database table? as well as in stored procedure?

     1.i come to know when i put membership its make a default database as aspnetdb so is there requirement of creating another database or i can use it? 2.if i take

    2 dropdownbox in signup form where i have to do coding of 1 dropdownbox select index changed?

    3.where i have to define the connection string?

    4.in login page i want to get the username.in which event i will get it so that i can maintain session, and send that user to default page. 5.should i use two database or i can add table in aspnetdb database for other forms?

     please give me right direction

    Filed under:
  • Re: login control and signup

    04-14-2008, 9:48 AM
    • Loading...
    • srulyt
    • Joined on 02-02-2008, 6:16 PM
    • Posts 209

    nicemanish:

    i want to use login control and signup form in my application but in sign up form i want to customized it more fields like country,state,city.. and so on.how i do that? for that i have to change the database table? as well as in stored procedure?

    yes you will have to make changes to the database

    nicemanish:
    1.i come to know when i put membership its make a default database as aspnetdb so is there requirement of creating another database or i can use it?

    you can use the DB for your own tables or if you already have your own DB you can add the memebership and roles tables to it using the wizard that comes with asp.net

    nicemanish:

    2.if i take

    2 dropdownbox in signup form where i have to do coding of 1 dropdownbox select index changed?

    if you have 2 seperate dropdownboxes each of them has its own event handlers

    nicemanish:

    3.where i have to define the connection string?

    in the connectionstrings section of web.config

    nicemanish:
    4.in login page i want to get the username.in which event i will get it so that i can maintain session, and send that user to default page
     

    the login control takes car of logging the user in and sending him to the right page. if you want to get the name later you can get it through the User.Identity.Name property

    nicemanish:
    5.should i use two database or i can add table in aspnetdb database for other forms?

    You an do what you want. I prefer one DB for everything

     

    For more info on all the above questions check out the security tutorials on this site http://www.asp.net/learn/security

    good luck

  • Re: login control and signup

    04-14-2008, 1:18 PM
    • Loading...
    • anas
    • Joined on 09-21-2006, 4:31 AM
    • Jerusalem
    • Posts 4,033

    Hi

    nicemanish:
    i want to use login control and signup form in my application but in sign up form i want to customized it more fields like country,state,city.. and so on.how i do that? for that i have to change the database table?

    you have 2 solutions here , you can use the Profile to store those custom properties for the user ,

    for this option , read : http://aspnet.4guysfromrolla.com/articles/101106-1.aspx

    The Other solution is to create a new DataBase table , and  add custom step in Create user wizatrd to let the user fill those details ..

    for this option , read : http://aspnet.4guysfromrolla.com/articles/070506-1.aspx

    nicemanish:
     1.i come to know when i put membership its make a default database as aspnetdb so is there requirement of creating another database or i can use it? 2.if i take

    I agree with the member above , you can add those tables to your application database , for this you need to use aspnet_regsql tool

    please read : http://weblogs.asp.net/scottgu/archive/2005/08/25/423703.aspx

    nicemanish:
    .in login page i want to get the username.in which event i will get it so that i can maintain session, and send that user to default page

    you dont need to store the user in session , because if you are going to use Membership tables... you should configure your application to use FormsAuthentication ,

    and so you can always get the Logged in user Name through

    HttpContext.current.User.Identity.Name , 

    and you can use the LoginName control to display the user Name in the page ....

     

    Regards,

    Best Regards,

    Anas Ghanem| LogFile
  • Re: login control and signup

    04-15-2008, 12:36 AM
    • Loading...
    • nicemanish
    • Joined on 04-01-2008, 4:20 PM
    • Posts 14

    thanx for ur reply,

    i want to share with you what i exactly want.

    i am making an application.i have a sqlserver 2000 and asp.net 2.0.in this application i have to make a login form and signup form.i am able to do it with asp.net1.1 and sql server 2000.just make a 3 tier architecture and make sp in database for i nserting.how these things i do.i am confused about when i make membership role then its make a new database as aspnetdb in which its created its own fields as well as storedprocedure.and for the signup form i have to make a another table with 24 fields.so should i make this table in aspnetdb database and stored procedure to insert data or i have to make a another database.in signupform there are 24 fields.in which i have to take dropdown populate on choose of select index change property.hope u will understand my confusion point?waiting for reply

  • Re: login control and signup

    04-15-2008, 2:46 AM
    • Loading...
    • anas
    • Joined on 09-21-2006, 4:31 AM
    • Jerusalem
    • Posts 4,033

    Hi

    you need to add the Mebeship tables to your applciation database ,

    because there is a relationships between your applciation database and the Membership database ,

    so you need to  use aspnet_regsql tool to accomplsih this ,

    after the membership tables has been added to your application database , you can create that table and connect it to your membeship tables....

     


    Regards,

    Best Regards,

    Anas Ghanem| LogFile
  • Re: login control and signup

    04-15-2008, 5:10 AM
    • Loading...
    • nicemanish
    • Joined on 04-01-2008, 4:20 PM
    • Posts 14

    thanx for reply,

    i do the same as u suggest.now i get all table in my database.now i have only two pints

    1.if i make signup chage suppose i want to add a textbox there as age.so for that i have to change the insert stored procaedure of membership?and how the textbox value i get on codebehind so that i make insert ?plz give me some code.

    2.what other changes i do in web.config file?

    Thanx in advance

  • Re: login control and signup

    04-15-2008, 2:18 PM
    Answer
    • Loading...
    • anas
    • Joined on 09-21-2006, 4:31 AM
    • Jerusalem
    • Posts 4,033

    nicemanish:
    1.if i make signup chage suppose i want to add a textbox there as age.so for that i have to change the insert stored procaedure of membership?

    no , you should not change the Membership stored Procedures ....

    Again for this , you can store the Age in the User profile or create a new table for it ...

    Please read the Links a mentioned in my Previous post !

     

    nicemanish:
    2.what other changes i do in web.config file?

    if you decided to use the user profile , you need to add the Age property in web.config ;

    Under <system.web> , you need to configure the profile properties , something like this:
     

      <profile>
          <properties>
            <add name="dateOfBirth" type="DateTime"/>
            <add name="Address"  type="String"/>
          </properties>
        </profile>
     

     

    Best Regards,

    Anas Ghanem| LogFile
Page 1 of 1 (7 items)
Microsoft Communities
Page view counter