คืออย่างงี้ครับ ผมได้ code เว็บภาษา html ตามเว็บแจก เท็มเพลส ฟรีต่างๆ
แต่มันเป็นภาษา html ซึ่งมันไม่สามารถ รันปุ่ม,textbox ต่างๆที่ผมที่ผมใส่ลงไปได้
มันจะฟ้องๆว่า รันไม่ได้
Server Error in '/Project' Application.
--------------------------------------------------------------------------------
Control 'TextBox1' of type 'TextBox' must be placed inside a form tag with runat=server.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: Control 'TextBox1' of type 'TextBox' must be placed inside a form tag with runat=server.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[HttpException (0x80004005): Control 'TextBox1' of type 'TextBox' must be placed inside a form tag with runat=server.]
System.Web.UI.Page.VerifyRenderingInServerForm(Control control) +336
System.Web.UI.WebControls.TextBox.AddAttributesToRender(HtmlTextWriter writer) +155
System.Web.UI.WebControls.WebControl.RenderBeginTag(HtmlTextWriter writer) +44
System.Web.UI.WebControls.TextBox.Render(HtmlTextWriter writer) +39
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +81
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +337
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +64
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +266
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +80
System.Web.UI.Control.Render(HtmlTextWriter writer) +39
System.Web.UI.Page.Render(HtmlTextWriter writer) +49
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +81
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +337
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +64
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5935
ผมเลยลองทุกวิธีเท่าที่มีความรู้เท่าหางกบ เช่น เปิดไฟล์ html แล้ว saveใหม่ให้เป็น aspx ก็ไม่ได้
<!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=utf-8" />
<title>Cantya</title>
<link rel="stylesheet" type="text/css" href="style.css" media="screen" />
</head>
<body>
<div id="main_container">
<div class="center_content">
<div id="header">
<div id="logo"><a href="index.html"><img src="images/logo.gif" alt="" title="" border="0" /></a></div>
<div id="menu">
<ul>
<li><a class="current" href="index.html" title="">home</a></li>
<li><a href="services.html" title="">about cantya</a></li>
<li><a href="services.html" title="">development</a></li>
<li><a href="services.html" title="">solutions</a></li>
<li><a href="services.html" title="">testimonials</a></li>
<li><a href="contact.html" title="">contact us</a></li>
</ul>
</div>
</div>
<div class="main_content">
<div class="main_content_top"></div>
<div id="boxes_content">
<div class="box">
<div class="box_content">
<div class="boxtitle">Quick Solutions</div>
<div class="box_icon"><img src="images/icon1.gif" alt="" title="" border="0"/></div>
<p class="text_content">
“Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.<br /><br />
<a href="#" class="read_more"><img src="images/read_more.gif" alt="" title="" border="0" /></a>
</p>
</div>
</div>
<div class="box">
<div class="box_content">
<div class="boxtitle">Organized Team</div>
<div class="box_icon"><img src="images/icon2.gif" alt="" title="" border="0"/></div>
<p class="text_content">
“Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.<br /><br />
<a href="#" class="read_more"><img src="images/read_more.gif" alt="" title="" border="0" /></a>
</p>
</div>
</div>
<div class="box">
<div class="box_content">
<div class="boxtitle">Growing Ideas</div>
<div class="box_icon"><img src="images/icon3.gif" alt="" title="" border="0"/></div>
<p class="text_content">
“Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.<br /><br />
<a href="#" class="read_more"><img src="images/read_more.gif" alt="" title="" border="0" /></a>
</p>
</div>
</div>
</div><!--end of boxes content-->
<div class="left_content">
<div class="title">Welcome to Cantya</div>
<img src="images/photo.jpg" alt="" title="" border="0" class="photo"/>
<p>
“Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
</p>
<p class="left_arrow">
“Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
</p>
<p class="left_arrow">
“Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
</p>
</div><!--end of left content-->
<div class="right_content">
<div class="title">News & Events</div>
<div class="right_news">
<div class="news_icon"></div>
<div class="news_content">
“Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
</div>
</div>
<div class="right_news">
<div class="news_icon"></div>
<div class="news_content">
“Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
</div>
</div>
<div class="right_news">
<div class="news_icon"></div>
<div class="news_content">
“Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
</div>
</div>
<div class="right_news">
<div class="news_icon"></div>
<div class="news_content">
“Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
</div>
</div>
</div><!--end of right content-->
<div class="clear"></div>
</div><!--end of main content-->
<div id="footer">
<div class="copyright">
<a href="http://indeziner.com">By INDEINZER</a>
</div>
<div class="footer_links">
<a href="#">About us</a>
<a href="#">Privacy policy</a>
<a href="#">Contact us </a>
</div>
</div>
</div>
</div>
</body>
</html>