用visualstudio2005 调试c#出现了问题 帮忙调试
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;namespace flash
{
public partial class Form1 : System.Windows.Forms .Form
{
private System.Windows.Forms.MainMenu mainMenu1;
private System.Windows.Forms.MenuItem menuItem1;
private System.Windows.Forms.MenuItem menuItem2;
private AxWMPLib .AxWindowsMediaPlayer axWindowsMediaPlayer1;
private System.ComponentModel.Container components = null;
public Form1()
{
InitializeComponent();
}
protected override void Dipose (bool disposing)
{
if (disposing)
{
if (disposing && (components != null))
{
components.Dispose(); } }
base.Dispose(disposing);
}
[STAThread]
static void Main()
{
Application.Run(new Form1());
} private void menuItem2_Click(object sender, System.EventArgs e)
{
OpenFileDialog ofDialog = new OpenFileDialog();
ofDialog.AddExtension = true;
ofDialog.CheckFileExists = true;
ofDialog.CheckPathExists = true;
ofDialog .FilterIndex =4;
if(ofDialog .ShowDialog ()==DialogResult.OK )
{
this.axWindowsMediaPlayer1.URL=ofDialog .FileName ;
}
} private void menuItem3_Click(object sender, System.EventArgs e)
{
Application.Exit();
}
}
}
错误:错误 1 类型“flash.Form1”已经包含“axWindowsMediaPlayer1”的定义 C:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\Projects\WindowsApplication1\WindowsApplication1\Form1.cs 16 49 WindowsApplication1
错误 2 类型“flash.Form1”已经包含“components”的定义 C:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\Projects\WindowsApplication1\WindowsApplication1\Form1.cs 17 49 WindowsApplication1
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;namespace flash
{
public partial class Form1 : System.Windows.Forms .Form
{
private System.Windows.Forms.MainMenu mainMenu1;
private System.Windows.Forms.MenuItem menuItem1;
private System.Windows.Forms.MenuItem menuItem2;
private AxWMPLib .AxWindowsMediaPlayer axWindowsMediaPlayer1;
private System.ComponentModel.Container components = null;
public Form1()
{
InitializeComponent();
}
protected override void Dipose (bool disposing)
{
if (disposing)
{
if (disposing && (components != null))
{
components.Dispose(); } }
base.Dispose(disposing);
}
[STAThread]
static void Main()
{
Application.Run(new Form1());
} private void menuItem2_Click(object sender, System.EventArgs e)
{
OpenFileDialog ofDialog = new OpenFileDialog();
ofDialog.AddExtension = true;
ofDialog.CheckFileExists = true;
ofDialog.CheckPathExists = true;
ofDialog .FilterIndex =4;
if(ofDialog .ShowDialog ()==DialogResult.OK )
{
this.axWindowsMediaPlayer1.URL=ofDialog .FileName ;
}
} private void menuItem3_Click(object sender, System.EventArgs e)
{
Application.Exit();
}
}
}
错误:错误 1 类型“flash.Form1”已经包含“axWindowsMediaPlayer1”的定义 C:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\Projects\WindowsApplication1\WindowsApplication1\Form1.cs 16 49 WindowsApplication1
错误 2 类型“flash.Form1”已经包含“components”的定义 C:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\Projects\WindowsApplication1\WindowsApplication1\Form1.cs 17 49 WindowsApplication1
解决方案 »
- 实现字母与ASCII码的转换,为什么会调试不成功啊,点击转换字母没有任何动静啊
- DropDownList 奇怪的初始化问题
- 急急急!!注册表启动项问题.
- HttpServletrequest 和 HttpServletresponse
- gridview与formview配合显示数据
- c#开发dll文件的格式是什么?并且在ASP.NET中调用
- window的tabControl控件使用代码如何设置到第2个选项卡上?
- 如何将2个图片合并成一个图片?也就是如何实现合并图层的功能?
- 创建了一个Form增大缩小类封装,但是这个封装却没有任何效果,希望各位指点下。
- 请问studio.net的属性窗口经常无法弹出?
- ~~~~~~~~~~~~~~~~c#和数据库连不上了?
- 如何把RichTextBox的数据追加到EXCEL中
private System.ComponentModel.Container components = null;
web1.aspx中:private void Button1_Click(object sender, System.EventArgs e) {
if(this.TextBox1.Text=="111")
{ Session["UserName"]="admin";
Response.Redirect("WebForm3.aspx");
}
}
web2.aspx:Page_Load中:this.Label1.Text=Session["UserName"].ToString()
可一显示出Session中的东西;
web3.aspx:private void Page_Load(object sender, System.EventArgs e)
{
// 在此处放置用户代码以初始化页面
if(!this.IsPostBack)
{
this.Label1.Text=Session["UserName"].ToString();
}
}
在web3.aspx怎么就显示不书Session的值admin;
很奇怪.以前从来都没遇到过这样的问题.