1:<asp:DropDownList id=usersf runat="server" DataTextField="shengfen" DataSource="<%# DataGrid1 %>">不能显示 表里的记录了 这样的绑定是否正确
DataGrid1 是从XML 文档中读入的数据
2:检测用户输入的过程
themessage 是出现错误的信息提示!直接通过一个label 显示出来 为什么现在没有显示错误提示 就直接跳转到reg2.aspx 如何修改 谢谢
private void Button1_Click(object sender, System.EventArgs e)
{
.......
message.Text=themessage;
myConnection.Close();
Session["temporary_username"]=userID.Text;
Session["temporary_useremail"]=useremail.Text;
Response.Redirect("reg2.aspx");
}
2、如果你眼睛速度快过页面跳转的速度应该可以看见显示的错误信息,我建议你可以用javascript来实现你的要求:
<script language="javascript">alert('错误信息');window.location='reg2.aspx'</script>
换成Response.Write("<script>window.open(\"reg2.aspx\",\"_self\");</script>");
dt.ReadXml("C:/Inetpub/wwwroot/companywotian/xml/sf.xml");
DataGrid1.DataSource=dt.Tables["table1"];
DataGrid1.DataBind();
DataGrid1 有什么问题呀 我就是这样绑定的
为什么注册成功之后不能实现网页跳转
themessage="注册成功,请返回登陆页面!";
SendResgister_Email();
Response.Write("<"+"META HTTP-EQUIV='Refresh'"+"CONTENT='2;URL=login.aspx'>");
如何修改 知道的请提示一下 谢谢 用Response.redirect("url");不行的?
DataSource="<%# DataGrid1 %>">
DataGrid1 是控件DataGrid的ID吗