=================================
| |
| iframe1 showmessage.aspx |
| |
| |
=================================
| |
| |
| iframe2 speak.aspx |
| |
=================================在iframe2中发的话,源程序也只是将发的话添加到数据库,没有看到语句写显示在iframe1里
但是发的话却显示在iframe1里了 怎么搞的及其简单的聊天室网各位大侠给个简易
//获取当前信息并添加到数据库里
protected void ButtonSpeak_Click(object sender, System.EventArgs e)
{
//获取用户输入的发言信息
string userName=Session["user_name"].ToString(); //用户名
string createTime=System.DateTime.Now.ToLongTimeString();//发言时间
string content=TextBoxContent.Text; //发言内容
string color=DropDownListColor.SelectedItem.Value; //颜色
string emotion=DropDownListEmotion.SelectedItem.Value; //表情
Message message=new Message(); //实例化Message类
message.Add(userName,createTime,content,color,emotion); //利用Message类的Add方法,向数据库添加留言
//清空发言框
TextBoxContent.Text="";
}//至此此条发的信息就显示在 iframe1里了 怎么搞的
| |
| iframe1 showmessage.aspx |
| |
| |
=================================
| |
| |
| iframe2 speak.aspx |
| |
=================================在iframe2中发的话,源程序也只是将发的话添加到数据库,没有看到语句写显示在iframe1里
但是发的话却显示在iframe1里了 怎么搞的及其简单的聊天室网各位大侠给个简易
//获取当前信息并添加到数据库里
protected void ButtonSpeak_Click(object sender, System.EventArgs e)
{
//获取用户输入的发言信息
string userName=Session["user_name"].ToString(); //用户名
string createTime=System.DateTime.Now.ToLongTimeString();//发言时间
string content=TextBoxContent.Text; //发言内容
string color=DropDownListColor.SelectedItem.Value; //颜色
string emotion=DropDownListEmotion.SelectedItem.Value; //表情
Message message=new Message(); //实例化Message类
message.Add(userName,createTime,content,color,emotion); //利用Message类的Add方法,向数据库添加留言
//清空发言框
TextBoxContent.Text="";
}//至此此条发的信息就显示在 iframe1里了 怎么搞的
我的错
看错了
showmessage.aspx 里直接写sql查询出来的