- 注册时间
- 2013-1-24
- 最后登录
- 2015-12-15
- 阅读权限
- 10
- 积分
- 134
- 精华
- 0
- 帖子
- 21
|
这里是aspx的代码
-------------
<div id="loginForm" style="padding:15px;padding-top:10px;">
<table >
<tr>
<td style="width:60px;"><label for="username$text">帐号:</label></td>
<td>
<input id="yusername" name="yusername" class="mini-textbox" required="true" style="width:150px;"/>
</td>
</tr>
<tr>
<td style="width:60px;"><label for="pwd$text">密码:</label></td>
<td>
<input id="ypwd" name="ypwd" class="mini-password" requiredErrorText="密码不能为空" required="true" style="width:150px;"/>
<a href="#" >忘记密码?</a>
</td>
</tr>
以下为aspx.cs里的部份代码
-------------------
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
using System.Text;
using System.Security.Cryptography;
public partial class ymd_mainmenu_ymderplogin : System.Web.UI.Page
{
string username;
string password;
protected void Page_Load(object sender, EventArgs e)
{
}
protected void imgbtnEnter_Click(object sender, ImageClickEventArgs e)
{
if (yusername.Text.Trim() != "" & ypwd.Text.Trim() != "")//看mini-textbox是否输入了用户名与密码 这里如何引用aspx页面上的mini-textbox的值,目前运行不了,请求解!
{
string MdPswdStr = GetMd5(ypwd.Text.ToString());
username = yusername.Text.ToString();
password = MdPswdStr;
if (Request.Cookies["user"] != null & Request.Cookies["pwd"] != null)
{
|
|