Click here to Skip to main content
15,890,512 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Issue 1

I have problems with a site. I restored a backup and now you can only login when you reload the page. It's also in .Net

>> If I click on login there is no event happening. Only when reloading page you can enter the site.

Issue 2

There is also a problem with signing up. You can signup as vendor but not as standard user.
The signup flow of a normal user has less mandatory.

Please advice.

Here is a snapshot of the code:
XML
<h3>Login with Email</h3>
                <asp:TextBox ID="TextBox1" value="Email ID" onblur="if(this.value == '') {this.value = 'Email ID'; this.type='text';}" onfocus="if(this.value == 'Email ID') {this.value = ''; this.type='Email ID';}" runat="server"  ></asp:TextBox>
                <asp:TextBox ID="TextBox2" value="Password"  onblur="if(this.value == '') {this.value = 'Password'; this.type='text';}" onfocus="if(this.value == 'Password') {this.value = ''; this.type='Password';}" runat="server"  ></asp:TextBox>

                     <div  class="forgot my_modal_forgot_open" style="text-align: center;padding-bottom: 15px;"><a id="forgot" href="#" style="font-weight: bold;color: #5E013F;font-style: italic;font-size: 12px;">Forgot Password</a></div>

                    <asp:Button CssClass="yes" ID="btnLogin" runat="server" Text="Login"
                      style="width: 100px;color:#fff;"  ></asp:Button>

                     <%--<div  class="forgot my_modal_forgot_open" style="text-align: center;"><a id="forgot" href="#" style="font-size: medium;color:Black;">Forgot Password</a></div>--%>

                  </div>
Posted
Updated 1-Mar-14 3:51am
v2

Quote:
>> If I click on login there is no event happening.
That is because there is no events declared for the Login button. If you check the markup of Button...
XML
<asp:Button CssClass="yes" ID="btnLogin" runat="server" Text="Login"
                      style="width: 100px;color:#fff;"  ></asp:Button>
, there is no such OnClick Events declared.

So, examine your code and debug it. You will find the flaws.
 
Share this answer
 
Comments
Member 10635224 2-Mar-14 9:44am    
Hello Tadit Dash. I have changed my markup: <asp:Button CssClass="yes" ID="btnLogin" runat="server" Text="Login" OnClick="btnLogin_Click" style="width: 100px;color:#fff;"> it's still not working - where could the issue lie?

I have another module on the default page that works. Signup seller. See the code below:

<asp:Button CssClass="yes" ID="btnSell" runat="server" Text="Join Us!"
style="width: 100px;color:#fff;" >
$("#sell").live("click", function() {
$("#my_modal_sell").css({'width':'383px'})
});
$("#btnSell").live("click", function() {
Adding one event name for OnClick event won't work, if you don't have that event defined in .cs page.
So, define the event and debug your code.
I have solved the login issue.

The problem was the following code was missing:

// if (HttpContext.Current.Session["vendorid"] != null)
// {
// con.cmd = new SqlCommand("USP_loginStatus", con.Connect());
// con.cmd.CommandType = CommandType.StoredProcedure;
// con.cmd.Parameters.Add("@userid", HttpContext.Current.Session["vendorid"]);
// con.cmd.Parameters.Add("@sessionId", HttpContext.Current.Session.SessionID.ToString());
// int x = con.cmd.ExecuteNonQuery();
// }
// con.DisConnect();

And the Stored Procedure was also not well configured.
 
Share this answer
 

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