Web Forms :: User For Sign Up Page With Same Username In Database

Jun 29, 2012

I'm currently doing sign up page where customer can sign up to use my website.however, when they type username, they will prompt that username is taken.how to check in database if the username is already been taken? i got 2 sign up page. 1st page is where the customer type their username, and password.2nd page is where they type thier personal particulars and then it will store in database..

below are my codes fot my 1st page

protected void btnNext_Click(object sender, EventArgs e)  { 
if (!Page.IsValid) {               
return;           
}  Session["username"] = tbNewId.Text;  
Session["password"] = tbConfirmPassword.Text; 
Response.Redirect("~/SignUp2.aspx");      }

this is my codes for second page

protected void btnNext_Click(object sender, EventArgs e) {
SqlConnection con = new SqlConnection();
con.ConnectionString = ConfigurationManager.ConnectionStrings["Connection"].ConnectionString;
String sql = "Insert into Customer (Name, Phone, Email, Address, Username, Password) ";
sql = sql + "Values (@Name, @Phone, @Email, @Address, @Username, @Password)";

[code]....

View 1 Replies


Similar Messages:

Security :: Ability To Sign In Using Either Username / Email Address?

Feb 15, 2010

How do I give user's the ability to sign in using either their username or email address? How do I implement profile URLS so that domain.com/username Server.Transfers to ViewProfile.aspx?userID=342 How do I implement a multi-domain auth system for a single web app so that users can create the same username at different domains?

View 1 Replies

Security :: How To Record Logged-on User's Username To Table In SQL Database

Mar 24, 2010

I have set up security on my ASP.NET site and currently have 1 user (soon to be more!). I would like to send the logged-on user's username to a variable, to input this value to a custom-designed stored procedure on my SQL database (for recording search statistics).Does anyone know how I can harness the current logged-on users username? I am using VB. Will the following achieve the result?session(username)If so, how do I implement this? I tried using "Current_User" in the SQL stored procedure, but obviously this did not record the ASP.NET user. Also, if the current user has not logged onto the site, I would like the "username" value to be "annonymous".

View 10 Replies

Show User Specific Data From Database Based On LoginID Username?

Jan 21, 2011

I am attempting to convert an online game i have written in ASP into ASP.NET,, but I am failing at a very early and probably a very amateurish stage.

I am using a Sample ASPX project. There is an ASPNETDB database included, when i register my username is added to the DB along with a userID and various other fields. This is stored in a table called aspnet_Users.

The Login Control is stored in a Site.Master file

<div class="loginDisplay">
<asp:LoginView ID="HeadLoginView" runat="server" EnableViewState="false"
onviewchanged="HeadLoginView_ViewChanged">
<AnonymousTemplate>
[ <a href="~/Account/Login.aspx" ID="HeadLoginStatus" runat="server">Log In</a> ]
</AnonymousTemplate>
<LoggedInTemplate>
Welcome <span class="bold"><asp:LoginName ID="HeadLoginName" runat="server" /></span>!
[ <asp:LoginStatus ID="HeadLoginStatus" runat="server" LogoutAction="Redirect" LogoutText="Log Out" LogoutPageUrl="~/"/> ]
</LoggedInTemplate>
</asp:LoginView>

I have created a new table called tblClubs, which stores information such as ClubName, StadiumCapacity etc
I added a field called 'Owner' and this is directly related to the UserName field in the aspnet_Users table

What I am trying to solve is to show user specific information from the database, based on their LoginID.

i.e

My username is Laclerque and my club is called Racing Mongoose, the stadium capacity is 9500.. the information for each User needs to be different and just show the information that is relevant to them.

obviously in the longer term, there is going to be 100's of these associations required for the full game, but not until i can get my head around the basics of how to set this information. I tend to work better when i can see a working sample, and then adapt things to suit my needs.

View 1 Replies

Security :: Redirecting User To Admin Page With Username

Mar 4, 2010

I have a directory structure root->admin-> admin operations admin page inherited from a ase page with principla security.demand role = "Admins" i am usinf forms authantication mode. i have also put a web.config file in admin folder, restricting other users. it is working normaly with siteroot/admin. I want to setup a mechanism to admin like siteroot/username/admin I can redirect to page admin but it gives security error, it should redirect to login page instead of if user did not sign in.

View 5 Replies

Security :: How To Redirect User To An Error Page From Login Control Upon Entering Wrong Username

Mar 1, 2011

I wanted to know how to add the feature- that user should be redirected to an error page where the error will be display, upon entery wrong username/password when trying to login through an asp.net login control?

1. how to redirect the user to an error page upon entering wrong username/password (from a login control which is placed on master page)?

2. how to pass the error to the error page so it can be displayed there?

View 28 Replies

Web Forms :: Hide The Homepage Login Panel After User Sign In?

Feb 2, 2011

I created a website, i create a Login panel in "Homepage(default.aspx)" using CSS & Serverside control(ASP.NET, C#), my question is when user login into my website, the default.aspx(homepage) login will be disable or hide. is there any way to do this? i used DIV tags to make a panel. do i use PANEL control to group the login panel?

View 4 Replies

Requirement For User To Sign Some ASPX Forms With (Local) Certificate

Nov 28, 2012

Asp.net 2 or 4.0

We have a controlled list of the users (It s an Extranet solutions for our collaborators)

We need to develop some new web pages (not all) some of which require the user accessing the web page to fill out some form and sign it using his digital signature/certificate. Each customer has their own certificate which he has on his computer (either as a local desktop file or the certificate may be probably integrated into the browser certificates via browser advanced options).

In other words:

1- Allow a client visiting some of the web pages to digitally sign the form before submitting it to our web server (the signature is his specific certificate)

2- Send either the form and the certificate or the html encrypted with his certificate to the web server

3- Read and identify the certificate on the web server (C# code)

View 1 Replies

Security :: How To Sign In As Another User While Already Logged In

May 30, 2010

I have used membership provider to implement my system. The system administrator can list the users. What I want to do is, administrator should be able to sign-in as the selected user. I can sign out administrator by FormsAuthentication.Signout but how can I sign in as the selected user? Passwords are hashed so I can not retrieve the passwords.

View 3 Replies

Allowing User To Sign Pdf File?

Feb 26, 2011

i have a pdf file and want to allow user to upload a gif file of their signature and display the signature in my pdf file...

follow the link [URL]

View 1 Replies

Sign Out Button Reloads All User Controls?

Apr 16, 2010

I have an aspx page with several user controls (ascx) as well as an asp:button for signing out.

The click event of the button clears the session and does a response.redirect to the login page.

However, before the click event is called, since the page posts back, all of the Page_Load events run for all of the controls.

What is the best way to have the click event code run without unnecessary reloading of all user controls?

View 2 Replies

Security :: When Try To Sign In With User Name And Password, It Will Not Execute?

Mar 18, 2010

I've created a login page but when I try to sign in with user name and password, it will not execute.I've gone over the process numerous times and have deleted the user (me) and re-created the user (me).Does anyone have any clues as to what I might be over-looking.

View 16 Replies

Forms Data Controls :: Users Add Their Birthdate When They Sign up On The Page?

Feb 13, 2011

The users add their birthdate when they sign up on the page. So now I need to view their age on their profile. But when I get this error
Object reference not set to an instance of an object. on this line: if (DateTime.TryParse(birthdate.ToString(), dk, DateTimeStyles.None, out birthday))

[Code]....

View 12 Replies

Security :: User Forced To Sign In After Changing Password?

Mar 22, 2010

Our user is using integrated windows authentication.

All users hit the login page where they must login with their domain/username/password combination.

Once they login, they can change their password.

Once the password is changed, they are displayed a message and they can navigate through the rest of the site.

I get the following scenarios...

1) User can view one page but not a second page User changes password USer clicks on link and receives page USer clicks on second link and is asked for credentials

2) User can view all pages USer changes password User clicks on link and receives page User clicks on second link (and all links thereafter) and receives page (they are never prompted for credentials)

3) User can not view any pages

User changes password USer clicks on link and is asked for credentials

View 2 Replies

Databases :: Display Message When New User Sign In Like Yahoo

Apr 23, 2010

I have a prob in my prjt .supose there are two application run when in one application we insert a record in database then in second application how can check new record inserted.I have a code to check last entry in database inserted bt problem is that first time page is loaded then display a message new record inserted bt next record inserted in database how can check new record insered wihtout refersh page .i dont want to page refresh again and again .

[code]....

U knw when new user sign in yahoo then display a message like this i want to this

View 12 Replies

Web Forms :: UserName Exist In Database Or Not?

Jun 9, 2010

How to check wether username exist in database or not in my regestration page? and plus i want to implement this feature also...suppose i allowed one user to select username as 'user01' and that user is still completing his form and same time another user tries to check whether 'user01' exist in database or not then i should show user as that 'user01' is not available for him and he should try to select some other username for him...

View 11 Replies

Security :: Using Page.User.Identity.Name To Fetch User Information From A MsSQL Database?

Dec 23, 2010

I have implemented Forms authentication in an ASP.NET MVC 2 website

By using <%: Page.User.Identity.Name %> on the Site.Master page I can display the userid of the logged in user.

I would like to use this value and display other information about the user that is stored in a User table in a MsSQL database, like:

<%: GetFirstname(Page.User.Identity.Name) %>

View 2 Replies

Web Forms :: How To Sign A Potential Member On Member Role With Create User Wizard

Feb 25, 2010

I have two member roles at my project:
1.) Administrator
2.) Member

From the toolbox in Visual Studio 2008, I have dragged and dropped the create user wizard into the stage. I aim that a guest can register itself and automatically join the "member" role. Not the role "administrator". How can I do that?

View 9 Replies

Web Forms :: How To Check Username And Password Stored In Database

Sep 15, 2010

i have login page. how check username and password store in database . plz reply with code.

i did it by form authentication b ut it not work.

View 2 Replies

Forms Data Controls :: Checking Username In Database

Apr 30, 2010

how to check if a particular data in the database already, for example, i want to check if a username already exist in database, then the user cant choose that username.

View 6 Replies

Web Forms :: Check Username And Email Address Exists In Database?

Jul 30, 2012

In this article u describe how to check

[URL]

But I want to Data retrive from data base in this way can u tell me  using java script and query string

View 1 Replies

Web Forms :: Encrypt And Decrypt Username Or Password Stored In Database

May 7, 2015

I am using asp.net website , now when a user creates new account his password must be saved in hashes , or gets encrypted and submits in database , next time when he login , my application fetch password from encrypted field , then decrypt it and match with the user entered password , if that's ok , page will be redirected to some other pages ... how to do that task ??

View 1 Replies

Security :: Forms Authentication - Username Utilizing The User Prinicipal, But It Just Returns Blank?

Jan 25, 2010

Ok, I almost hate to ask this because I'm sure it's been covered many times on this forum, but I'm starting to get too frustrated trying to get it to work, so I'm gonna ask anyway.I have setup forms authentication on my site and have it working without any issues. What I'm trying to do now is to add "Remember Me" functionality so that the users don't have to log in each time they access the site. I'm able to get the authentication part down, but the issue I'm having is that when the user logs in, I set certain attributes in Session variables for that user (name, site role, etc.). These values are obtained from a database after the user has been authenticated, based on the username. What I'm having problems with is getting at this username from the FormsAuthentication cookie.

After I authenticate the first time, I setup my cookie this way:

[Code]....

I have tried getting at the Username utilizing the User prinicipal, but it just returns blank.

View 2 Replies

Web Forms :: Showing All Active User's Activities Without Refreshing Page And Without Database Hit

Mar 22, 2010

We are making a site in asp.net 3.5 C# and i am showing my all user activites on one page (i am making a call to db at page load) but to get updated user activities i have to refresh the page so that again one hit go to the db and get all updated data.

But i want to update this feature like this site : [URL]

Objective: i want when user open activity page first time then in first hit it will get 20 latest user activities but after that i dont want to make a database call for that again and again. but each new activity of user's will automatically append to my activity list one by one.

View 5 Replies

Forms Data Controls :: Insert Current Username Into SQL Database When Editing A Gridview?

Dec 15, 2010

I have a gridview on a page that allows a user to edit the data. I need to be able to insert the current user's username in the database table whenever they click update on the gridview. I am new to coding and im strugling to get this project done.I am using MSSQL Server 2005 and VB in the codebehind.

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved