Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/83.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 要在网页中显示的语法_C#_Html_Css_Asp.net - Fatal编程技术网

C# 要在网页中显示的语法

C# 要在网页中显示的语法,c#,html,css,asp.net,C#,Html,Css,Asp.net,嗨,我正在准备web应用程序。我想在网页中显示标题。我已经在Visual Studio 2012中编写了代码 编译时出错:“TextBox和Label”是未知元素,以上语法是正确的 <table> <tr> <td style="width: 120px; text-align: left; vertical-align: top" class="blue">Title <asp:label ID="Title" runat=

嗨,我正在准备web应用程序。我想在网页中显示标题。我已经在Visual Studio 2012中编写了代码

编译时出错:“TextBox和Label”是未知元素,以上语法是正确的

<table>

  <tr>

    <td style="width: 120px; text-align: left; vertical-align: top" class="blue">Title
      <asp:label ID="Title" runat="server" Text="*" CssClass="error" Visible="false"></asp:label>
    </td>

    <td>
      <asp: Textbox runat="server" ID="txtTitle" style="width: 200px" CssClass="control"></asp:TextBox>
    </td>

  </tr>

</table>

标题
如果有什么问题,请告诉我


提前谢谢

请删除
asp:Textbox

像这样试试

<asp:Textbox runat="server" ID="txtTitle" style="width: 200px" CssClass="control"></asp:TextBox>

我认为这就是您面临的错误

如果这是您面临的错误,则必须从
中删除代码,并在
标记中添加相同的代码。 像这样


标题

我们能看一些源代码吗?听起来你在定义程序范围之外的元素?把你的代码放在你遇到错误的地方。代码添加了。。。。代码是否正确,将网页中的“标题”显示为asp的输出?您是否打算编写“=”而不是“:”?您是否可以检查我编写的代码是否正确?您是否希望对其进行一些更改…如果不建议使用正确的代码或语法,我想您已将上述代码插入html标记中。是吗?不,我用的是HTML和.net,它们都是Samethaku,都是为了你的答案!!