当前位置:编程学习 > C#/ASP.NET >>

关于一个简单的显示下拉框的asp.net代码问题,请高手指点一下,到底哪儿出问题?

<script runat="server" language="vb" >
  Sub Page_Load()
     if Page.IsPostback then
       Message.Text="You have selected " + list1.SelectedItem.Value
     end if
  End Sub
</script>
<html>
  <head>
    <title>Drop Down List Example</title>
  </head>
  <body>
      <asp:label id="Message" runat="server" />
      <br />
      <form runat="server">
      Which city do you wish to look at hotels for?<br /><br />
      <asp:dropdownlist id="list1" runat="server">
        <asp:listitem>Madrid</asp:listitem>
        <asp:listitem>Oslo</asp:listitem>
        <asp:listitem>Lisbon</asp:listitem>
      </asp:dropdownlist>
      <br /><br /><br /><br />
      <input type="Submit">
      </form>
  </body>
</html>


我用的是IE8浏览器,不知是代码的问题还是浏览器的问题,不显示下拉框,只显示文字。 --------------------编程问答-------------------- 没看出毛病,换个浏览器试试就知道了 --------------------编程问答-------------------- 我看不出来。。

我爱编码 --------------------编程问答-------------------- 代码的确没问题。这么简单的问题,不要太专牛角尖
补充:.NET技术 ,  ASP.NET
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,