用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

解决方案 »

  1.   

    去掉这两句试试:private  AxWMPLib .AxWindowsMediaPlayer axWindowsMediaPlayer1;
    private System.ComponentModel.Container components = null;
      

  2.   

    我有3个页面web1.aspx;web2.aspx;web3.aspx;
    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;
    很奇怪.以前从来都没遇到过这样的问题.