| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 818 人关注过本帖
标题:有一个小问题想请教各师哥师姐!
只看楼主 加入收藏
huangchao
Rank: 1
等 级:新手上路
帖 子:49
专家分:0
注 册:2006-6-13
收藏
 问题点数:0 回复次数:10 
有一个小问题想请教各师哥师姐!

<%@ Page Language="C#" ContentType="text/html" ResponseEncoding="gb2312" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script runat="server">
void Botton1_Click(Object src,EventArgs e)
{
string DownListValue=DownList1.SelectedItem.Text;
labell.Text=DownListValue;
}
</script>
</head>
<body>
<form runat="server">
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse:collapse" bordercolor="#111111" width="100%">
<tr>
<td width="100%" align="center" bgcolor="#ffff00">
DropDownList控件演示例子
</td>
</tr>
</table>
请选择一个青春组合:
<p>
<asp:DropDownList id="DownList1" runat="server">
<asp:ListItem>--请选择一个青春组合--</asp:ListItem>
<asp:ListItem>中国力量</asp:ListItem>
<asp:ListItem>漂亮宝贝</asp:ListItem>
<asp:ListItem>青春美少女</asp:ListItem>
<asp:ListItem>动感男孩</asp:ListItem>
</asp:DropDownList>
<p>
<asp:Button id="Botton1" Text="选择" Onclick="Botton1_Click" runat="server">
<br>
<br>
您选择的组合是:
<asp:label id="labell" Text="暂没有选择!" ForeColor="red" runat="server">

</form>
</body>
</html>
本人是一个初学者,提出的问题请不要见笑啊!本人实在看不出哪里有错啊,请各位师哥师姐帮帮忙!小弟在此谢谢了!

搜索更多相关主题的帖子: 师哥 师姐 
2006-12-05 13:10
人妖123
Rank: 1
等 级:新手上路
威 望:2
帖 子:462
专家分:0
注 册:2006-11-8
收藏
得分:0 

至少要报错吧


你自归家我自归,说着如何过,我断不思量,你莫思量我。将你从前予我心,付与他人可。
2006-12-05 13:17
小天狼星
Rank: 3Rank: 3
等 级:新手上路
威 望:6
帖 子:483
专家分:0
注 册:2006-11-1
收藏
得分:0 

楼主,请问你,你确定你现在是想研究一下HTML代码吗

[face=仿宋_GB2312]一生那么长,长不过时间定义下的永远;一生那么短,短不过人海中一次又一次匆忙的擦肩。[/face]
2006-12-05 13:21
wyg4859
Rank: 2
等 级:新手上路
威 望:4
帖 子:883
专家分:0
注 册:2006-8-2
收藏
得分:0 
把你报的错贴出来

http://www.找到组织!找到党!
2006-12-05 13:56
huangchao
Rank: 1
等 级:新手上路
帖 子:49
专家分:0
注 册:2006-6-13
收藏
得分:0 

Server Error in '/' Application.
--------------------------------------------------------------------------------

Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Type 'System.Web.UI.WebControls.Button' does not have a public property named 'br'.

Source Error:


Line 34: <asp:Button id="Botton1" Text="选择" Onclick="Botton1_Click" runat="server">
Line 35: </form>
Line 36: <br>
Line 37: <br>
Line 38: 您选择的组合是:

Source File: /7.aspx Line: 36 这是报错原因


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210

2006-12-05 15:05
huangchao
Rank: 1
等 级:新手上路
帖 子:49
专家分:0
注 册:2006-6-13
收藏
得分:0 
刚才没有写上报错原因,实在不好意思啊!上面是显示页面报错原因!
2006-12-05 15:07
漯河
Rank: 4
等 级:贵宾
威 望:12
帖 子:1255
专家分:0
注 册:2006-8-8
收藏
得分:0 
以下是引用小天狼星在2006-12-5 13:21:22的发言:
楼主,请问你,你确定你现在是想研究一下HTML代码吗

这也是我想说的话!!!


——life is full of ups and downs!
2006-12-05 15:25
bygg
Rank: 16Rank: 16Rank: 16Rank: 16
来 自:乖乖的心中
等 级:版主
威 望:241
帖 子:13555
专家分:3076
注 册:2006-10-23
收藏
得分:0 
asp:Button id="Botton1" Text="选择" Onclick="Botton1_Click" runat="server" />
<br>
<br>
您选择的组合是:
<asp:label id="labell" Text="暂没有选择!" ForeColor="red" runat="server" />

飘过~~
2006-12-05 15:29
漯河
Rank: 4
等 级:贵宾
威 望:12
帖 子:1255
专家分:0
注 册:2006-8-8
收藏
得分:0 
难道搂主上面的代码是自己输入的?

——life is full of ups and downs!
2006-12-05 15:51
wkm2000
Rank: 1
等 级:新手上路
帖 子:119
专家分:0
注 册:2006-3-6
收藏
得分:0 
这好像是哪本书里的例子!
记不清在哪看过了!!

MSN:wkm821215@ OICQ:49297869 ^_^
2006-12-05 16:00
快速回复:有一个小问题想请教各师哥师姐!
数据加载中...
 
   



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

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