dir=c:
\TempImageFiles\;"/>
6.2前台功能实现
6.2.1首页
该页面是本网站的首页,其中有登陆功能,也有页面转换功能,并且有加入收藏夹以及设为首页的功能。
6-1首页
代码:
protectedvoidPage_Load(objectsender,EventArgse)
{TextBox1.Attributes.Add("onfocus","if(this.value=='用户名')this.value=''");
TextBox1.Attributes.Add("onblur","if(this.value=='')this.value='用户名'");
TextBox2.Attributes.Add("value","密码");
TextBox2.Attributes.Add("onfocus","if(this.value=='密码'){this.type='password';this.value=''}");
TextBox2.Attributes.Add("onblur","if(this.value==''){this.type='text';this.value='密码'}");
TextBox3.BackColor=System.Drawing.Color.Transparent;TextBox2.BackColor=System.Drawing.Color.Transparent;TextBox1.BackColor=System.Drawing.Color.Transparent;TextBox3.Attributes.Add("onfocus","if(this.value=='搜索')this.value=''");
TextBox3.Attributes.Add("onblur","if(this.value=='')this.value='搜索'");}
ProtectedvoidImageButton2_Click(objectsender,ImageClickEventArgse)
{ClientScript.RegisterStartupScript(ClientScript.GetType(),"alert","");
}
protectedvoidImageButton3_Click(objectsender,ImageClickEventArgse)
{
ClientScript.RegisterStartupScript(ClientScript.GetType(),"alert","");}
protectedvoidImageButton4_Click(objectsender,ImageClickEventArgse)
{ClientScript.RegisterStartupScript(ClientScript.GetType(),"alert","");
}
protectedvoidImageButton5_Click(objectsender,ImageClickEventArgse)
{ClientScript.RegisterStartupScript(ClientScript.GetType(),"alert","");
}
protectedvoidImageButton6_Click(objectsender,ImageClickEventArgse)
{ClientScript.RegisterStartupScript(ClientScript.GetType(),"alert","");
}
6.2.2公司简介页面
该页面是本网站的关于我们页面,这是对我们公司的一个介绍。
6-2关于我们
6.2.3咨询服务
、
6-3咨询服务
6.2.4投资中国
6-4投资中国
6.2.5企业观点
6-5企业观点
6.2.6诚聘英才
6-6诚聘英才
6.2.7新闻信息
6-7新闻信息
6.3后台功能实现
6.3.1后台登陆页面
6-7登陆页面
代码:
protectedvoidImageButton1_Click(objectsender,ImageClickEventArgse)
{if(TextBox1.Text==""||TextBox0.Text=="")//判断用户名或者密码是否为空
{ClientScript.RegisterStartupScript(ClientScript.GetType(),"alert","");}
stringusercode=txtcode.Text.Trim();
if(usercode!
=Session["iCode"].ToString()){ClientScript.RegisterStartupScript(ClientScript.GetType(),"alert","");
TextBox0.Text="";}
else
{stringstrUid=TextBox1.Text.Trim();//把用户输入的用户名赋值给strUser
stringstrPwd=TextBox0.Text.Trim();//把用户输入的密码赋值给strPwd
stringSQLStr="select*fromUserswhereUserName='"+strUid+"'andPassword='"+strPwd+"'";
OleDbDataReaderdr=DBA.GetDataReader(SQLStr);
if(dr.Read())
{Session["UserName"]=strUid;
Session["UserID"]=dr["UserID"].ToString();
Session["IsSysRole"]=dr["IsSysRole"].ToString();ClientScript.RegisterStartupScript(ClientScript.GetType(),"alert","");}
}
}
6.3.1后台首页
6-8后台首页
代码:
华文彩云;color:
#000000;">
250px"height="500px"marginheight="0"marginwidth="0"allowtransparency="true">