妈的...一天能卖一颗就很不错了...
我的意思是:想点击按钮从一个网页跳到程序里面的另一个网页
应该怎么加什么代码?
protected void Button1_Click(object sender, EventArgs e)
{
HyperLink myHyperLink = new HyperLink();
myHyperLink.NavigateUrl = "http://localhost:1118/testProgram/WebForm1.aspx";
try
{
string selectSql = "select *from userpassword where name='" + TextBox1.Text + "' and password='" + TextBox2.Text + "'";
OleDbConnection myConnection = new OleDbConnection(connectDatabase);
myConnection.Open();
OleDbCommand myCommand = new OleDbCommand(selectSql, myConnection);
OleDbDataReader myReader = myCommand.ExecuteReader();
if (myReader.Read())
myHyperLink.NavigateUrl = "http://localhost:1118/testProgram/WebForm1.aspx";//实现跳转语句,但是不能跳转,应该怎么改?
else
Label4.Text = "请查看用户名或密码是否正确!!";
}
catch (Exception ee)
{
Label4.Text = ee.Message;
}
}