| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 473 人关注过本帖
标题:asp.net C#。。。的错误
取消只看楼主 加入收藏
ping燕s
Rank: 2
来 自:江西
等 级:论坛游民
帖 子:40
专家分:33
注 册:2009-9-22
结帖率:71.43%
收藏
已结贴  问题点数:30 回复次数:0 
asp.net C#。。。的错误
   刚学c#,谁帮调试下,纠正下。。
先谢啦。。


using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class ListPicker : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void SourceList_SelectedIndexChanged(object sender, EventArgs e)
    {

    }
    protected void ListBox1_SelectedIndexChanged(object sender, EventArgs e)
    {
 
    }
    protected void AddAll_Click(object sender, EventArgs e)
    {
        TargetList.SelectedIndex = -1;
        foreach(ListItem li in SourceList.Items)
        {        AddItem(li);    }

    }

    protected void AddOne_Click(object sender, EventArgs e)
    {
        if (SourceList.SelectedIndex >= 0)
            AddItem(SourceList.SelectedItem);
    }

    protected void Remove_Click(object sender, EventArgs e)
    {
        if (TargetList.SelectedIndex >= 0)
        {
            TargetList.Items.RemoveAt(TargetList.SelectedIndex);
            TargetList.SelectedIndex = -1;
        }
    }

               protected void AddItem(ListItem li)
{
    TargetList.SelectedIndex = -1;
    TargetList.Items.Add(li);
}
    public ListItemCollection SelectedItems
    {
        get { return TargetList.Items; }
    }
    public Boolean AllowDuplicates
    {
        get
        {
            return (Boolean)ViewState["allowDuplicates"];
        }
        set
        {
            ViewState["allowDuplicates"] = value;
        }
    }

   

    }
       public  void AddSourceItem(String sourceItem)
{
    SourceList.Items.Add(sourceItem);
}
    public void ClearAll()
    {
        SourceList.Items.Clear();
        TargetList.Items.Clear();
    }
 protected   void AddItem(ListItem li)
    {
        TargetList.SelectedIndex = -1;
        if (this.AllowDuplicates == true)
        
            TargetList.Items.Add(li);
        else
        {
            if (TargetList.Items.FindByText(li.Text) == null)
        {
                TargetList.Items.Add(li);
            }
        }
}

错误    1    应输入 class、delegate、enum、interface 或 struct
错误    2    应输入 class、delegate、enum、interface 或 struct
错误    3    应输入 class、delegate、enum、interface 或 struct
 
上面那错误什么情况发生呢?????


   
搜索更多相关主题的帖子: asp 
2010-04-19 16:54
快速回复:asp.net C#。。。的错误
数据加载中...
 
   



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

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