如何在visual studio中使用html代码 [英] how to use an html code in visual studio
问题描述
嗨
我将.html页面复制并粘贴到visual studio中的.aspx文件中。我将id和runat服务器添加到链接按钮,添加了带有runat服务器属性的表单标签,并在我的第一个代码中添加了此代码:
%@ Page Language =C#AutoEventWireup =true CodeBehind =HostDomain.aspx.csInherits =project.HostDomain%>
但通常当您双击控件时,您会看到背后的代码并且你可以在那里编码...我无法在后面的代码中看到元素id并且页面生成错误... PLZ HELP
Hi
I copied and pasted an .html page to an .aspx file in visual studio . I added id and runat server to a link button , added a form tag with runat server attribute and added this code at the first of my code :
%@ Page Language="C#" AutoEventWireup="true" CodeBehind="HostDomain.aspx.cs" Inherits="project.HostDomain" %>
but usually when you double click on a controll you see the code behind and you can code there ...I cant see the element id in the code behind and the page generates an error... PLZ HELP
推荐答案
你必须设置property
You have to Set property
runat="server"
of HTML控件
在codeBehind使用ID ...... :)
问候,
Nirav Prabtani。
of HTML controls
to use ID at codeBehind...... :)
Regards,
Nirav Prabtani.
在runn你的程序之前只需经过一次你的设计...
这意味着在你的.aspx页面下面溢出和设计来源是他们的..
一旦去设计并检查它们如果他们有任何错误..
before runn ur program just go through once ur design ...
that means in ur .aspx page below spilt and design source are their..
once go for design and check it their if their any errors..
这篇关于如何在visual studio中使用html代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!