[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.2

Control 'LinkButton2' of type 'LinkButton' must be placed inside a form tag with runat=server

Asked by wtran in Programming for ASP.NET, Microsoft Development, C# Programming Language

Tags: Control 'LinkButton2' of type 'LinkButton' must be placed inside a form tag with runat=server

Hi ,

I'm getting the following error message and all the form Tags seems to be in order.  I'm currently getting the following error message.  Its send an email but I'm getting an error message.

Server Error in '/' Application.
--------------------------------------------------------------------------------

Control 'LinkButton2' of type 'LinkButton' 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 'LinkButton2' of type 'LinkButton' 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 'LinkButton2' of type 'LinkButton' must be placed inside a form tag with runat=server.]
   System.Web.UI.Page.VerifyRenderingInServerForm(Control control) +1999935
   System.Web.UI.WebControls.LinkButton.AddAttributesToRender(HtmlTextWriter writer) +37
   System.Web.UI.WebControls.WebControl.RenderBeginTag(HtmlTextWriter writer) +17
   System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +17
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +130
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +24
   System.Web.UI.Page.Render(HtmlTextWriter writer) +26
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +25
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +121
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +22
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1896

 


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210


==========================================================

The code is as follows:

Any help is greatly appreciated!
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ContactUs.aspx.cs" Inherits="WEBABM.ContactUs" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
 
 
 
 
 
 
<html>
<head>
  <script language='JavaScript' src='Date.js'></script>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
	<title>Contact Us</title>
	<link href="style2.css" rel="stylesheet" type="text/css">
	
	<script language = "javascript">
<!--
  
   function sstchur_SmartScroller_GetCoords()
   {
      var scrollX, scrollY;
    
      
      if (document.all)
      {
         if (!document.documentElement.scrollLeft)
            scrollX = document.body.scrollLeft;
         else
            scrollX = document.documentElement.scrollLeft;
               
         if (!document.documentElement.scrollTop)
            scrollY = document.body.scrollTop;
         else
            scrollY = document.documentElement.scrollTop;
      }   
      else
      {
         scrollX = window.pageXOffset;
         scrollY = window.pageYOffset;
      }
   
      document.forms["form1"].xCoordHolder.value = scrollX;
      document.forms["form1"].yCoordHolder.value = scrollY;
   }
   
   function sstchur_SmartScroller_Scroll()
   {
      var x = document.forms["form1"].xCoordHolder.value;
      var y = document.forms["form1"].yCoordHolder.value;
      window.scrollTo(x, y);
   }
   
   window.onload = sstchur_SmartScroller_Scroll;
   window.onscroll = sstchur_SmartScroller_GetCoords;
   window.onkeypress = sstchur_SmartScroller_GetCoords;
   window.onclick = sstchur_SmartScroller_GetCoords;
// -->
</script>
	
	
</head>
 
<body>
 
<table cellpadding="0" cellspacing="0" border="0"  align="center">
	<tr>	
	  <td valign="top" width="766" height="800">
																	    
                                                                        <form id="form1" runat="server">
	  	<table cellpadding="0" cellspacing="0" border="0">
			<tr>
				<td valign="top" width="766" style="background:URL(images/header6.gif); height: 305px;">
					<table cellpadding="0" cellspacing="0" border="0" style="height: 336px">
						<tr>
							<td valign="top" width="544" style="height: 336px">
							
								<div style="padding-left:63px; padding-top:15px " class="main"><a href="http://www.seacan.ca" class="main" style="{text-decoration:none;}">
                                    www.Seacan.ca</a></div>
								<div style="padding-left:58px; padding-top:10px ">
									<table border="0" width="100%" id="table2">
										<tr>
											<td align="left">
                                                <strong><em><span style="font-size: 24pt; font-family: Arial">Contact US</span></em></strong></td>
										</tr>
										
										
										<tr>
											<td align="left"><i><b>
											<font face="Arial" size="5" color="#CA0000">"A Succulent Gift... in a pinch"</font></b></i></td>
										</tr>
									</table>
								</div>
                                
								<div style="padding-left:88px; padding-top:20px ">
                                    &nbsp;</div>
								
							</td>
							<td valign="top" style="height: 336px; width: 213px;">
								<div style="padding-left:34px; padding-top:14px " class="white">
								<script> document.write(CURDATE);</script>
								</div>
								<div style="padding-left:0px; padding-top:43px ;display:none;" >
                                    &nbsp; <a href="#" class="text3">Contacts</a><img src="images/q1.gif" alt=""><a href="#" class="text3">Help</a></div>
							</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td valign="top" width="766" height="336" style="background:URL(images/tall_y.jpg); background-repeat:repeat-y; background-position:right ">
					<table cellpadding="0" cellspacing="0" border="0">
						<tr>
							<td valign="top" width="21" height="336"></td>
							<td valign="top" width="722" height="336" style="background-color:#FFFFFF ">
								<table cellpadding="0" cellspacing="0" border="0">
									<tr>
										<td valign="top" width="722" style="height: 3px"></td>
									</tr>
									<tr>
										<td valign="top" width="722" height="333">
											<table cellpadding="0" cellspacing="0" border="0">
												<tr>
													<td valign="top" height="333" style="width: 10px">&nbsp;</td>
													<td valign="top" height="333" style="width: 718px">
														
														<table cellpadding="0" cellspacing="0" border="0" style="height:100% ">
															
															
															
															<tr>
																<td valign="top" width="712" style="background-color:#D7D9DA ; height: 22px;">
																	<div style="padding-left:25px; padding-top:13px "><font face="Arial" color="#808080"><b>CONTACT US</b></font></div>
																</td>
															</tr>
															
															
															<tr>
																<td valign="top" width="538" style="height: 1px"></td>
															</tr>
															<tr>
																<td valign="top" width="538" height="157" class="text3" style=" background-color:#F0F1F2 ">
																	<div style="padding-left:25px; padding-top:13px ; text-align: center;" class="main">
																	    <strong>We love to hear from our customers.&nbsp; Ask us a question or tell us what you think.</strong><br />
																	    
																	   Phone: 1(902)493-3099<br />
																	   Fax: 1(902)445-4666
                                                                        <hr />															
																	    
                                                                            &nbsp;<table>
																	        <tr><td>To:</td><td>
                                                                                info@seacan.ca</td></tr>
																	        <tr><td>Name:</td><td><asp:TextBox ID="TxtName" runat="server" CssClass="main" Width="361px"></asp:TextBox></td></tr>
																	        <tr><td>Company:</td><td><asp:TextBox ID="TxtCompany" runat="server" CssClass="main" Width="361px"></asp:TextBox></td></tr>
																	        <tr><td>Phone:</td><td><asp:TextBox ID="TxtPhone" runat="server" CssClass="main" Width="292px"></asp:TextBox>
                                                                                <asp:CheckBox ID="chkPhone" runat="server" Text="Please Call" /></td></tr>
																	        <tr><td>Email:</td><td><asp:TextBox ID="txtEmail" runat="server" CssClass="main" Width="361px"></asp:TextBox></td></tr>
																	        <tr><td valign=top>Message:</td><td><asp:TextBox ID="txtMessage" runat="server" Height="80px" Width="361px" CssClass="main" MaxLength="4000"></asp:TextBox></td></tr>
																	        <tr><td colspan=2 align="center" valign="top">
                                                                                
                                                                                
                                                                                <table>
                                                                                    <tr>
                                                                                        <td><asp:Image ID="Image1" runat="server" ImageUrl="images/v98A4.jpg" AlternateText="98A4" ImageAlign="Middle" /></td>
                                                                                        <td align="left">Please type the code<br />shown in the image
                                                                                            <br />
                                                                                            and click send.</td>
                                                                                        <td align="left"><asp:TextBox ID="txtCode" runat="server" Width="92px"></asp:TextBox>
                                                                                    
                                                                                            <asp:Button ID="btnSubmit" runat="server" Text="Send" OnClick="btnSubmit_Click" 
                                                                                                Height="20px" Width="54px" />
                                                                                    
                                                                                </td>
                                                                                    </tr>
                                                                                    
                                                                                </table>
                                                                                
                                                                                <asp:Label ID="lblError" runat="server" ForeColor="#980203" Text="We're sorry, the code you typed didn't match the code shown in the image.<br> Please try again."
                                                                                    Visible="False"></asp:Label></td>
                                                                                </tr>
 
																	    </table>
																	    <span style="display: none;">
																	    <asp:TextBox ID="xCoordHolder" runat="server" Width="79px"></asp:TextBox>
                                                                    <asp:TextBox ID="yCoordHolder" runat="server" Width="57px"></asp:TextBox>
                                                                    </span>
                                                                        
                                                                        
                                                                    </div>	
                                                                    </td>								
                                                                    										</tr>
										
															
															
															<tr>
																<td valign="top" width="258" height="2" style="background-color:#4A82A3 "></td>
															</tr>
														</table>
														
														
														
													</td>
													
													<td valign="top" width="2" height="333"></td>
													<td valign="top" width="5" height="333"></td>
												</tr>
											</table>
										</td>
									</tr>
								</table>
							</td>
							<td valign="top" height="336" style="background:URL(images/right.jpg); background-repeat:no-repeat; background-position:right top; width: 16px;"></td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td valign="top" width="766" style="background:URL(images/footer.jpg); height: 113px;">
					<table cellpadding="0" cellspacing="0" border="0">
						<tr>
							<td valign="top" width="766" style="height: 50px">
								<table cellpadding="0" cellspacing="0" border="0">
									<tr>
										<td valign="top" width="312" height="73">
											<div style="padding-left:52px; padding-top:20px " class="text3">
                                                &nbsp;</div>
										</td>
										<td valign="top" width="448" height="73">
											<div style="padding-left:0px; padding-top:21px "><a href="WhatsNew.aspx" class="white">What's new</a><img src="images/q2.gif" alt=""><a href="Legal.aspx" class="white">Legal
                                                Terms</a><img src="images/q2.gif" alt=""><a href="About.aspx" class="white">About us</a><img src="images/q2.gif" alt=""><a href="ComingSoon.aspx" class="white">Security</a><img src="images/q2.gif" alt=""><a href="SiteMap.aspx" class="white">Site guide</a></div>
										</td>
									</tr>
								</table>
							</td>
						</tr>
						<tr>
							
							<td valign="top" width="766" height="55">
								<div style="padding-left:52px; padding-top:2px " class="text">
									Copyright &copy 2007
									<a href="#" class="text" style="text-decoration:none ">
									Seacan Inc.</a> All Rights reserved</div>
								</td>
						</tr>
					</table>
				</td>
			</tr>
		</table>
                                                                        </form> 
                                                                        
                                                                        
	  </td>
	</tr>
</table>
</body>
</html>
 
Related Solutions
Keywords: Control 'LinkButton2' of type 'Link…
 
Loading Advertisement...
 
[+][-]03/27/08 03:19 PM, ID: 21226326Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/27/08 03:28 PM, ID: 21226370Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/27/08 05:32 PM, ID: 21227051Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/27/08 05:38 PM, ID: 21227084Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/27/08 06:42 PM, ID: 21227411Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/27/08 07:11 PM, ID: 21227527Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zones: Programming for ASP.NET, Microsoft Development, C# Programming Language
Tags: Control 'LinkButton2' of type 'LinkButton' must be placed inside a form tag with runat=server
Sign Up Now!
Solution Provided By: the_bachelor
Participating Experts: 2
Solution Grade: B
 
 
Loading Advertisement...
20091021-EE-VQP-81 / EE_QW_2_20070628