| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 4665 人关注过本帖
标题:CS0103: 当前上下文中不存在名称“Textbox1”
只看楼主 加入收藏
水晶心
Rank: 1
等 级:新手上路
帖 子:69
专家分:0
注 册:2010-7-27
结帖率:80%
收藏
已结贴  问题点数:20 回复次数:5 
CS0103: 当前上下文中不存在名称“Textbox1”
<td style="width: 794px; height: 50px; text-align: center">
                    <asp:Label ID="label" runat="server" Height="36px" Style="z-index: 100; left: 28px;
                        position: absolute; top: 136px" Text="考勤编号:" Width="177px"></asp:Label>
                </td>
                <td style="width: 794px; height: 50px; text-align: center">
                </td>
                <td style="width: 794px; height: 50px; text-align: center">
                    <asp:Label ID="Label1" runat="server" Height="36px" Style="z-index: 100; left: 26px;
                        position: absolute; top: 297px" Text="考勤日期" Width="177px"></asp:Label>
                </td>
                <td style="width: 794px; height: 50px; text-align: center">
                    <asp:TextBox ID="T_kid" runat="server" Height="30px" Style="z-index: 100; left: 215px;
                        position: absolute; top: 137px" Width="173px"></asp:TextBox>
                    <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" DataSourceID="SqlDataSource1"
                        DataTextField="lx" DataValueField="xid" Style="z-index: 102; left: 625px; position: absolute;
                        top: 143px">


protected void  Calendar1_SelectionChanged(object sender, EventArgs e)
{
 Textbox1.Text   =   Calendar1.SelectedDate.ToShortDateString();
}
    protected void  Calendar2_SelectionChanged(object sender, EventArgs e)
{
Textbox2.Text   =   Calendar2.SelectedDate.ToShortDateString();
}
}
搜索更多相关主题的帖子: 名称 Textbox1 
2010-08-17 11:21
foktime
Rank: 11Rank: 11Rank: 11Rank: 11
来 自:奥斯维辛
等 级:贵宾
威 望:35
帖 子:795
专家分:2742
注 册:2009-9-4
收藏
得分:6 
无语啊姐姐...
就是说缺少id为Textbox1、Textbox2的Textbox控件啊 都没有你给谁赋Text啊
2010-08-17 12:10
yukai621
Rank: 2
等 级:论坛游民
威 望:1
帖 子:27
专家分:71
注 册:2010-8-13
收藏
得分:6 
<td style="width: 794px; height: 50px; text-align: center">
                    <asp:Label ID="label" runat="server" Height="36px" Style="z-index: 100; left: 28px;
                        position: absolute; top: 136px" Text="考勤编号:" Width="177px"></asp:Label>
                </td>
                <td style="width: 794px; height: 50px; text-align: center">
                </td>
                <td style="width: 794px; height: 50px; text-align: center">
                    <asp:Label ID="Label1" runat="server" Height="36px" Style="z-index: 100; left: 26px;
                        position: absolute; top: 297px" Text="考勤日期" Width="177px"></asp:Label>
                </td>
                <td style="width: 794px; height: 50px; text-align: center">
                    <asp:TextBox ID="TextBox1" runat="server" Height="30px" Style="z-index: 100; left: 215px;
                        position: absolute; top: 137px" Width="173px"></asp:TextBox>
                    <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" DataSourceID="SqlDataSource1"
                        DataTextField="lx" DataValueField="xid" Style="z-index: 102; left: 625px; position: absolute;
                        top: 143px">
这个应该不会在报你说的那个错了
2010-08-17 13:47
yukai621
Rank: 2
等 级:论坛游民
威 望:1
帖 子:27
专家分:71
注 册:2010-8-13
收藏
得分:0 
<td style="width: 794px; height: 50px; text-align: center">
                    <asp:Label ID="label" runat="server" Height="36px" Style="z-index: 100; left: 28px;
                        position: absolute; top: 136px" Text="考勤编号:" Width="177px"></asp:Label>
                </td>
                <td style="width: 794px; height: 50px; text-align: center">
                </td>
                <td style="width: 794px; height: 50px; text-align: center">
                    <asp:Label ID="Label1" runat="server" Height="36px" Style="z-index: 100; left: 26px;
                        position: absolute; top: 297px" Text="考勤日期" Width="177px"></asp:Label>
                </td>
                <td style="width: 794px; height: 50px; text-align: center">
                    <asp:TextBox ID="TextBox1" runat="server" Height="30px" Style="z-index: 100; left: 215px;
                        position: absolute; top: 137px" Width="173px"></asp:TextBox>
<asp:TextBox ID="TextBox2" runat="server" Height="30px" Style="z-index: 100; left: 215px;
                        position: absolute; top: 137px" Width="173px"></asp:TextBox>

                    <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" DataSourceID="SqlDataSource1"
                        DataTextField="lx" DataValueField="xid" Style="z-index: 102; left: 625px; position: absolute;
                        top: 143px">
2010-08-17 13:49
水晶心
Rank: 1
等 级:新手上路
帖 子:69
专家分:0
注 册:2010-7-27
收藏
得分:0 
<table style="z-index: 100; left: 0px; position: absolute; top: 0px">
            <tr>
                <td colspan="4" rowspan="2" style="height: 121px; text-align: center">
                    <span style="font-size: 32pt">考勤管理系统<br />
                        <span style="font-size: 11pt">&nbsp;
                            <asp:TextBox ID="TextBox1" runat="server" Height="29px" Style="z-index: 100;
                            left: 213px; position: absolute; top: 300px" Width="175px"></asp:TextBox>
                            <asp:Calendar ID="Calendar1" runat="server" Style="z-index: 101; left: 418px; position: absolute;
                                top: 298px" OnSelectionChanged="Calendar1_SelectionChanged"></asp:Calendar>
                            <asp:Calendar ID="Calendar2" runat="server" Style="z-index: 102; left: 161px; position: absolute;
                                top: 396px" OnSelectionChanged="Calendar2_SelectionChanged"></asp:Calendar>
                            &nbsp;
我这里定义了TextBox ID="TextBox1
2010-08-17 14:48
冰镇柠檬汁儿
Rank: 16Rank: 16Rank: 16Rank: 16
来 自:北京
等 级:版主
威 望:120
帖 子:8078
专家分:6657
注 册:2005-11-7
收藏
得分:6 
错误解决了吗?
从你在一楼发的帖子看,确实没有TextBox1的定义,要不你把整个文件的代码发上来。

本来无一物,何处惹尘埃
It is empty at all here, Why pm 2.5 is so TMD high!
2010-08-20 09:57
快速回复:CS0103: 当前上下文中不存在名称“Textbox1”
数据加载中...
 
   



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

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