标题:CS1061: “ASP.controlcache_aspx”不包含“SqlDataSource_Selected”的定义 ...
只看楼主
宸虞熙
Rank: 1
等 级:新手上路
帖 子:3
专家分:1
注 册:2012-11-1
结帖率:0
已结贴  问题点数:10 回复次数:1 
CS1061: “ASP.controlcache_aspx”不包含“SqlDataSource_Selected”的定义,
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ControlCache.aspx.cs" Inherits="ControlCache" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.

<html xmlns="http://www.
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
   
    </div>
    <asp:Literal ID="Literal1" runat="server"></asp:Literal>
    <asp:Literal ID="Literal2" runat="server"></asp:Literal>
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
        DataSourceID="SqlDataSource2">
        <Columns>
            <asp:BoundField DataField="username" HeaderText="username"
                SortExpression="username" />
            <asp:BoundField DataField="password" HeaderText="password"
                SortExpression="password" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server"
        ConnectionString="<%$ ConnectionStrings:AdventureWorksConnectionString2 %>"
        SelectCommand="SELECT * FROM [Location]"
        CacheDuration="10"
        EnableCaching="true"
        OnSelecting="SqlDataSource2_Selecting"
        >
        </asp:SqlDataSource>
    </form>
</body>
</html>
搜索更多相关主题的帖子: PUBLIC html title asp server 
2012-11-01 08:45
yms123
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:209
帖 子:12488
专家分:19042
注 册:2004-7-17
得分:10 
某个变量未定义,另外LZ贴的是网页代码,不是出错的代码
ControlCache.aspx.cs
出错的代码在这个里面
2012-11-02 14:39



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-385439-1-1.html




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

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