登录和注册问题.NET [英] Login and signup problems .NET
问题描述
问题1
我的网站有问题。我恢复了备份,现在您只能在重新加载页面时登录。它也在.Net
>>如果我点击登录,则不会发生任何事件。只有在重新加载页面时,您才能进入该网站。
第2期
还有一个问题报名。您可以注册为供应商,但不能注册为标准用户。
普通用户的注册流程必须较少。
请咨询。
以下是代码的快照:
< ; h3 > 使用电子邮件登录< ; / h3 >
< asp:TextBox ID = TextBox1 < span class =code-attribute> value = 电子邮件ID onblur = if(this.value ==''){this.value ='Email ID'; this.type ='text';} onfocus = if(this.value =='Email ID'){this.value =''; this.type ='电子邮件ID';} runat = server > < / asp:TextBox >
< asp:TextBox ID = TextBox2 value = 密码 onblur = < span class =code-keyword> if(this.value ==''){this.value ='Password'; this.type ='text';} onfocus = if(this.value =='Password'){this.value =''; this.type ='密码';} runat = 服务器 > < / asp:TextBox >
< div class = 忘记my_modal_forgot_open style = text-align:center; padding-bottom:15px ; > < a id = 忘记 < span class =code-attribute> href = # style = font-weight:bold; color:#5E013F; font-style:italic; font-size:12px; > 忘记密码< / a > < / div >
< asp:按钮 CssClass = 是 ID = btnLogin runat = server 文字 = 登录
< span class =code-attribute> style = width:100px; color:#fff; > < / asp:按钮 >
<% - < div class = 忘记my_modal_forgot_open style = text-align:center;>< a id = 忘记 href = # style = font-size:medium; color:Black;>忘记密码 < / a > < / div > - %>
< / div >
引用:>>如果我点击登录,则不会发生任何事件。这是因为没有为Login按钮声明事件。如果你检查Button的标记......
< asp:按钮 CssClass = 是 ID < span class =code-keyword> = btnLogin runat = server 文字 = 登录
< span class =code-attribute> 样式 = width:100px; color: #fff; > < / asp:Button >,没有这样的
OnClick
宣布的事件。
因此,检查您的代码并进行调试。你会发现这些缺陷。
我已经解决了登录问题。
问题是以下代码丢失了:< br $>
// 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();
存储过程也没有很好地配置。
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:
<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>
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...
<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.
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.
这篇关于登录和注册问题.NET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!