Click here to Skip to main content
15,921,884 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i download templaes from internet and use it but when i signup the button data save into database but without any value
like this in database


SQL
MemID   MemName  MemPass Email  Phnenumber UserTypeID
2				NULL	   NULL
3				NULL	     NULL
NULL	NULL	NULL	NULL	NULL	     NULL


here is template code
ASP.NET
  <div id="container_demo" >
    <!-- hidden anchor to stop jump http://www.css3create.com/Astuce-Empecher-le-scroll-avec-l-utilisation-de-target#wrap4  -->
    <a class="hiddenanchor" id="toregister"></a>
    <a class="hiddenanchor" id="tologin"></a>
    <div id="wrapper">
        <div id="login" class="animate form">
            <form  action="WebForm1.aspx" autocomplete="on">
                <h1>Log in</h1>
                <p>
                    <label for="username" class="uname" data-icon="u" > Your email or username </label>
                    <input id="username" name="username" required="required" type="text" placeholder="myusername or mymail@mail.com"/>
                </p>
                <p>
                    <label for="password" class="youpasswd" data-icon="p"> Your password </label>
                    <input id="password" name="password" required="required" type="password" placeholder="eg. X8df!90EO" />
                </p>
                <p class="keeplogin">
                    <input type="checkbox" name="loginkeeping" id="loginkeeping" value="loginkeeping" />
                    <label for="loginkeeping">Keep me logged in</label>
                </p>
                <p class="login button">
                    <input type="submit" value="Login" />
                </p>
                <p class="change_link">
                    Not a member yet ?
                    <a href="#toregister" class="to_register">Join us</a>
                </p>
            </form>
        </div>
 
        <div id="register" class="animate form">
            <form  action="#tologin" autocomplete="on">
                <h1> Sign up </h1>
               
                <p>
                    <label for="usernamesignup" class="uname" data-icon="u">Your username</label>
                    <input id="usernamesignup" runat="server" name="usernamesignup" required="required" type="text" placeholder="mysuperusername690" />
                </p>
                 <p>
                    <label for="passwordsignup" class="youpasswd" data-icon="p">Your password </label>
                    <input id="password1" name="passwordsignup" runat="server" required="required" type="password" placeholder="eg. X8df!90EO"/>
                </p>
                <p>
                    <label for="emailsignup" class="youmail" data-icon="e" > Your email</label>
                    <input id="emailsignup" name="emailsignup" runat="server" required="required" type="text" placeholder="mysupermail@mail.com"/>
                </p>
                
               
              <%--  <p>
                    <label for="passwordsignup_confirm" class="youpasswd" data-icon="p">Please 
                    confirm your password </label>
                    <input id="passwordsignup_confirm" runat="server name="passwordsignup_confirm" required="required" type="password" placeholder="eg. X8df!90EO"/>
                </p>--%>
                <asp:Label ID="Label1" runat="server"></asp:Label>
                <p class="signin button">
                    <input type="button"  value="submitt"  runat="server" onserverclick="Btn_SignUp_Click" />
                </p>
                <p class="change_link"> 
                    Already a member ?
                    <a href="#tologin" class="to_register"> Go and log in </a>
                </p>
            </form>
        </div>
         
    </div>
</div>
Posted

1 solution

 
Share this answer
 
Comments
Diya Ayesa 15-Nov-13 7:32am    
this is simple template form but i use this form please check this link
http://www.ajaxshake.com/plugin/EN/1069/7d65a566/registration-form-with-html5-and-css3-registrationform.html
... and i als create sp and funtion

sp
ALTER procedure [dbo].[spinsert]
@MemName nvarchar(50),
@MemPass nvarchar(50),
@Email nvarchar(50)


as
insert into MemberAccount (MemName,MemPass,Email)
values (@MemName,@MemPass,@Email)

funtion
Database db = DatabaseFactory.CreateDatabase("forum");
public void Registration(string MemName, string MemPass, string Email)
{
db.ExecuteNonQuery("spinsert", new object[] { MemName, MemPass, Email});
}

button code
protected void Btn_SignUp_Click (object sender, EventArgs e)
{
try
{
abb.Registration(usernamesignup.Value, password1.Value, emailsignup.Value);
//ab.usernameexist(txt_fullname.Value);
Label1.Text = ("UserName already exist");
//cc.getusername(TextBox1.Text);
//sig.Text = ("Register Success");
Label1.Text = ("Signup Success");
}
catch
{
Label1.Text = ("SignUp failed");

}
usernamesignup.Value = "";
password1.Value = "";
emailsignup.Value = "";

}

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900