控件不能显示的问题

hukejie 2003-03-09 09:07:01
用vs.net做了一个简单的页面,上面只是放几个textbox控件和button控件并没有进行数据绑定,保存后,用在框架中能够显示,但控件不能显示
...全文
55 12 打赏 收藏 转发到动态 举报
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
hukejie 2003-03-10
  • 打赏
  • 举报
回复
up
hukejie 2003-03-10
  • 打赏
  • 举报
回复
高手帮忙!急!急!急!急!急!急!急!急!急!急!急!急!急!急!急!急!急!急!急!急!急!急!急!急!急!急!急!急!急!急!急!急!急!急!急!急!急!急!急!急!
hukejie 2003-03-10
  • 打赏
  • 举报
回复
还是不行,在框架页中还是显示不出textbox控件和button控件,但是却显示出了label控件的值,可是单独浏览时却正常(此时lable控件的值却不显示)
dragontt 2003-03-10
  • 打赏
  • 举报
回复
the more info you can see:
ms-help://MS.VSCC/MS.MSDNVS.2052/cpgenref/html/cpconpage.htm
dragontt 2003-03-10
  • 打赏
  • 举报
回复
@ page 设定中的
Inherits 属性是
定义供页继承的代码隐藏类。
在你那个代码中是没有定义代码隐藏类的
所以,你定义的Inherits找不到值
因此不能浏览你设计的页面
dragontt 2003-03-10
  • 打赏
  • 举报
回复
To hukejie(笨小孩):

把代码改成

<%@ Page language="c#" Codebehind="univ_append.aspx.cs" AutoEventWireup="false" %>
<HTML>
<HEAD>
<title>添加高校</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio 7.0">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<LINK href="../site.css" type="text/css" rel="stylesheet">
</HEAD>
<body language="javascript" onclick="return window_onclick()">
<form id="univ_append" method="post" runat="server">
<asp:Label id="lblMessage" runat="server" ForeColor="Red" Visible="False">记录添加成功</asp:Label>
<asp:Panel id="Panel1" runat="server">
<TABLE class="dajianju" id="Table1" style="WIDTH: 560px; HEIGHT: 464px" borderColor="#ccccff" cellSpacing="0" cellPadding="0" width="560" align="center" bgColor="#f2f8ff" border="1">
<TR>
<TD style="HEIGHT: 31px" vAlign="center" borderColor="#f2f8ff" align="middle" background="images/bg.jpg" colSpan="2"><FONT face="宋体"></FONT><FONT face="宋体"><STRONG>添加学校</STRONG></FONT></TD>
</TR>
<TR>
<TD class="dajianju" style="WIDTH: 97px; HEIGHT: 32px" align="middle" borderColorDark="#f2f8ff"> 中文名称*</TD>
<TD borderColorDark="#f2f8ff"> 
<asp:TextBox id="txtCname" runat="server" BorderColor="White" Wrap="False" Width="168px" Height="22px"></asp:TextBox>  
<asp:RequiredFieldValidator id="rfv1" runat="server" ErrorMessage="必须输入中文名称" ControlToValidate="txtCname"></asp:RequiredFieldValidator></TD>
</TR>
<TR>
<TD class="dajianju" style="WIDTH: 97px; HEIGHT: 28px" align="middle" borderColorDark="#f2f8ff">英文名称</TD>
<TD borderColorDark="#f2f8ff"> 
<asp:TextBox id="txtEname" runat="server" Width="168px" Height="22px"></asp:TextBox></TD>
</TR>
<TR>
<TD style="WIDTH: 97px; HEIGHT: 34px" borderColorDark="#f2f8ff">
<P align="center">别    名</P>
</TD>
<TD borderColorDark="#f2f8ff"> 
<asp:TextBox id="txtAlias" runat="server" Width="168px" Height="22px"></asp:TextBox></TD>
</TR>
<TR>
<TD style="WIDTH: 97px; HEIGHT: 32px" borderColorDark="#f2f8ff">
<P align="center">概 </P>
<P align="center"> </P>
<P align="center">  </P>
<P align="center">况</P>
</TD>
<TD borderColorDark="#f2f8ff"> 
<asp:TextBox id="txtIntro" runat="server" Width="440px" Rows="15" Columns="60" TextMode="MultiLine"></asp:TextBox></TD>
</TR>
<TR>
<TD style="WIDTH: 97px" borderColorDark="#f2f8ff">
<P align="center"> 链    接</P>
</TD>
<TD borderColorDark="#f2f8ff"> 
<asp:TextBox id="txtPage" runat="server" Width="168px" Height="22px"></asp:TextBox></TD>
</TR>
<TR>
<TD style="WIDTH: 97px; HEIGHT: 33px" borderColorDark="#f2f8ff">
<P align="center"> 网    址</P>
</TD>
<TD borderColorDark="#f2f8ff"> 
<asp:TextBox id="txtWWW" runat="server" Width="168px" Height="22px"></asp:TextBox></TD>
</TR>
<TR>
<TD borderColorDark="#f2f8ff"></TD>
<TD align="middle" borderColorDark="#f2f8ff">
<asp:Button id="Button1" runat="server" Text="添加"></asp:Button>            <INPUT type="reset" value="取消"></TD>
</TR>
</TABLE>
</asp:Panel>
</form>
</body>
</HTML>
hukejie 2003-03-10
  • 打赏
  • 举报
回复
我单独浏览没问题啊,就是在框架中不能显示web控件
saucer 2003-03-09
  • 打赏
  • 举报
回复
do you have IIS installed?

in VS.NET, go to menu, Build->Build Solution, then access the page in your browser
hukejie 2003-03-09
  • 打赏
  • 举报
回复
saucer(思归, MS .NET MVP)
能不能详细点,俺是新手,拜托!
saucer 2003-03-09
  • 打赏
  • 举报
回复
it works fine without the first line, did you BUILD your project in VS.NET?
hukejie 2003-03-09
  • 打赏
  • 举报
回复
<%@ Page language="c#" Codebehind="univ_append.aspx.cs" AutoEventWireup="false" Inherits="exchanges.Admin.univ_append" %>
<HTML>
<HEAD>
<title>添加高校</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio 7.0">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<LINK href="../site.css" type="text/css" rel="stylesheet">
</HEAD>
<body language="javascript" onclick="return window_onclick()">
<form id="univ_append" method="post" runat="server">
<asp:Label id="lblMessage" runat="server" ForeColor="Red" Visible="False">记录添加成功</asp:Label>
<asp:Panel id="Panel1" runat="server">
<TABLE class="dajianju" id="Table1" style="WIDTH: 560px; HEIGHT: 464px" borderColor="#ccccff" cellSpacing="0" cellPadding="0" width="560" align="center" bgColor="#f2f8ff" border="1">
<TR>
<TD style="HEIGHT: 31px" vAlign="center" borderColor="#f2f8ff" align="middle" background="images/bg.jpg" colSpan="2"><FONT face="宋体"></FONT><FONT face="宋体"><STRONG>添加学校</STRONG></FONT></TD>
</TR>
<TR>
<TD class="dajianju" style="WIDTH: 97px; HEIGHT: 32px" align="middle" borderColorDark="#f2f8ff"> 中文名称*</TD>
<TD borderColorDark="#f2f8ff"> 
<asp:TextBox id="txtCname" runat="server" BorderColor="White" Wrap="False" Width="168px" Height="22px"></asp:TextBox>  
<asp:RequiredFieldValidator id="rfv1" runat="server" ErrorMessage="必须输入中文名称" ControlToValidate="txtCname"></asp:RequiredFieldValidator></TD>
</TR>
<TR>
<TD class="dajianju" style="WIDTH: 97px; HEIGHT: 28px" align="middle" borderColorDark="#f2f8ff">英文名称</TD>
<TD borderColorDark="#f2f8ff"> 
<asp:TextBox id="txtEname" runat="server" Width="168px" Height="22px"></asp:TextBox></TD>
</TR>
<TR>
<TD style="WIDTH: 97px; HEIGHT: 34px" borderColorDark="#f2f8ff">
<P align="center">别    名</P>
</TD>
<TD borderColorDark="#f2f8ff"> 
<asp:TextBox id="txtAlias" runat="server" Width="168px" Height="22px"></asp:TextBox></TD>
</TR>
<TR>
<TD style="WIDTH: 97px; HEIGHT: 32px" borderColorDark="#f2f8ff">
<P align="center">概 </P>
<P align="center"> </P>
<P align="center">  </P>
<P align="center">况</P>
</TD>
<TD borderColorDark="#f2f8ff"> 
<asp:TextBox id="txtIntro" runat="server" Width="440px" Rows="15" Columns="60" TextMode="MultiLine"></asp:TextBox></TD>
</TR>
<TR>
<TD style="WIDTH: 97px" borderColorDark="#f2f8ff">
<P align="center"> 链    接</P>
</TD>
<TD borderColorDark="#f2f8ff"> 
<asp:TextBox id="txtPage" runat="server" Width="168px" Height="22px"></asp:TextBox></TD>
</TR>
<TR>
<TD style="WIDTH: 97px; HEIGHT: 33px" borderColorDark="#f2f8ff">
<P align="center"> 网    址</P>
</TD>
<TD borderColorDark="#f2f8ff"> 
<asp:TextBox id="txtWWW" runat="server" Width="168px" Height="22px"></asp:TextBox></TD>
</TR>
<TR>
<TD borderColorDark="#f2f8ff"></TD>
<TD align="middle" borderColorDark="#f2f8ff">
<asp:Button id="Button1" runat="server" Text="添加"></asp:Button>            <INPUT type="reset" value="取消"></TD>
</TR>
</TABLE>
</asp:Panel>
</form>
</body>
</HTML>
saucer 2003-03-09
  • 打赏
  • 举报
回复
show your code

62,066

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧