| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 673 人关注过本帖
标题:我是菜鸟,请问使用message,有什么条件吗 ?
只看楼主 加入收藏
wxf_xsfy
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2006-8-14
收藏
 问题点数:0 回复次数:6 
我是菜鸟,请问使用message,有什么条件吗 ?

源码如下:

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Messaging;

namespace WebApplication1
{
/// <summary>
/// WebForm1 的摘要说明。
/// </summary>
public class WebForm1 : System.Web.UI.Page
{
protected System.Web.UI.WebControls.Label Label2;
protected System.Web.UI.WebControls.TextBox TextBox1;
protected System.Web.UI.WebControls.Button Button1;
protected System.Web.UI.WebControls.Button Button2;
protected System.Web.UI.WebControls.Label Label1;


}
private void Page_Load(object sender, System.EventArgs e)
{
// 在此处放置用户代码以初始化页面
}

#region Web 窗体设计器生成的代码
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: 该调用是 ASP.NET Web 窗体设计器所必需的。
//
InitializeComponent();
base.OnInit(e);
}

/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.Button2.Click += new System.EventHandler(this.Button2_Click);
this.Load += new System.EventHandler(this.Page_Load);

}
#endregion

private void Button2_Click(object sender, System.EventArgs e)
{
message.text="hello"+ textbox1.text ;
}
}
我也引用system.messaging了啊 .
为什么会报错呢 ?
c:\inetpub\wwwroot\WebApplication1\WebForm1.aspx.cs(55): 找不到类型或命名空间名称“message”(是否缺少 using 指令或程序集引用?)


搜索更多相关主题的帖子: using System message Web 
2006-08-14 17:42
enthusiasm
Rank: 1
等 级:新手上路
帖 子:43
专家分:0
注 册:2006-7-9
收藏
得分:0 
我也碰见了类似的问题,请问这问题怎么解决呀?

没人知道吗?
2006-08-17 15:02
chenjin145
Rank: 1
等 级:禁止访问
帖 子:3922
专家分:0
注 册:2006-7-12
收藏
得分:0 
message.text
沒這個東西吧

客戶端的對話框彈出必須用腳本語言

[url=javascript:alert(1);] [div]fdgfdgfdg\" on\"[/div] [/url]
2006-08-17 15:12
lijia0105
Rank: 1
等 级:新手上路
帖 子:20
专家分:0
注 册:2006-8-17
收藏
得分:0 

你可以用服务器程序在客户端写脚本,比如response.write("alert('XXX')"),服务器端不能写弹出信息的

2006-08-17 15:36
小妖精ai漂亮
Rank: 1
等 级:新手上路
帖 子:95
专家分:0
注 册:2006-7-21
收藏
得分:0 

难道是这个意思?
MessageBox.show();


别试图教猪唱歌,这样不但教不会,还会惹猪不高兴!
2006-08-17 15:54
enthusiasm
Rank: 1
等 级:新手上路
帖 子:43
专家分:0
注 册:2006-7-9
收藏
得分:0 
楼主,我好象明白了,那个message只是页面里的一个组件的id。

例如你在页面里放了这么一段代码:

<asp:Label id="message" style="Z-INDEX: 101; LEFT: 240px;
POSITION: absolute; TOP: 128px" runat="server"
Width="240px" Height="40px">这便是你所谓的message吧!!!</asp:Label>
2006-08-18 08:44
zhubian
Rank: 1
等 级:新手上路
帖 子:18
专家分:0
注 册:2005-10-31
收藏
得分:0 
其实,在这里你没有定义"message"啊.
protected System.Web.UI.WebControls.Label Label2;
protected System.Web.UI.WebControls.TextBox TextBox1;
protected System.Web.UI.WebControls.Button Button1;
protected System.Web.UI.WebControls.Button Button2;
protected System.Web.UI.WebControls.Label Label1;
这里的Label 只有Label1 和Label2...
引用的话应该是Label1.Text or Lable2.Text
还有..using System.Messaging;//.这个也不用引用进来啊.问题不在这里.
2006-08-19 11:03
快速回复:我是菜鸟,请问使用message,有什么条件吗 ?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.012231 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved