主题:为什么messagebox不起作用
public string MessageBox(string TxtMessage, string Url)
{
string str;
str = "<script language=javascript>alert('" + TxtMessage + "');location.href='" + Url + "'</script>";
return str;
}
public Boolean ExecSQL(string sqlStr)
{
OleDbCommand myCmd = new OleDbCommand(sqlStr,MyConn);
try
{
myCmd.ExecuteNonQuery();
//MyConn.Close();
}
catch
{
MyConn.Close();
return false;
}
return true;
}
if (Mydata.ExecSQL(UpdateSqlstr)==true)
{
Mydata.MessageBox("修改信息成功", "index.aspx?NavParentId=1&NavId=2");
}
为什么这段代码一点作用都没有?
{
string str;
str = "<script language=javascript>alert('" + TxtMessage + "');location.href='" + Url + "'</script>";
return str;
}
public Boolean ExecSQL(string sqlStr)
{
OleDbCommand myCmd = new OleDbCommand(sqlStr,MyConn);
try
{
myCmd.ExecuteNonQuery();
//MyConn.Close();
}
catch
{
MyConn.Close();
return false;
}
return true;
}
if (Mydata.ExecSQL(UpdateSqlstr)==true)
{
Mydata.MessageBox("修改信息成功", "index.aspx?NavParentId=1&NavId=2");
}
为什么这段代码一点作用都没有?