| | |
Control 'LeftNav1_lnkCore' of type 'LinkButton' must be placed inside a form tag with
Please support our ASP.NET advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
![]() |
•
•
Join Date: Aug 2007
Posts: 10
Reputation:
Solved Threads: 0
Control 'LeftNav1_lnkCore' of type 'LinkButton' must be placed inside a form tag with
0
#1 Jan 7th, 2009
Hi All,
I have an application that i m developing in VS2003 using asp.net and c#
in the left navigation page I need to add the functionality to open and close a panel in the left nav.
here is my code:
---->
-------<
When I click on the link button lnkCore, i want to expand (i.e make the panel pnlCL visible.)
But I get the following error message that "Control 'LeftNav1_lnkCore' of type 'LinkButton' must be placed inside a form tag with runat="server""
i have done similar thing in my other application, and I didnt face any problem, What could the problem be?
Please help me.. i have been at this since morning!!!!!
Thanks in advance
I have an application that i m developing in VS2003 using asp.net and c#
in the left navigation page I need to add the functionality to open and close a panel in the left nav.
here is my code:
---->
asp.net Syntax (Toggle Plain Text)
<%@ Control Language="c#" AutoEventWireup="false" Codebehind="LeftNav.ascx.cs" Inherits="CE.userControls.LeftNav" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %> <td class="leftcolumn" valign="top"> <div id="snav"> <div class="subnav"> <ul class='navlink'> <li class='navlink3'> <asp:LinkButton ID="lnkCore" Runat="server" OnClick="lnkCore_Click" CausesValidation="False" > CCR </asp:LinkButton> </li> </ul> </div> <asp:Panel ID="pnlCl" Runat=server Visible="False"> <% Response.Write ("<div class='subnav'><ul class='navlink'><li class='navlink'"); int i=0; //for (int i=0;i<arrBlock.Count;i++) //{ string gyr = "0"; if (Convert.ToInt32(HttpContext.Current.Session["sesgyr"]) > 0) {gyr = HttpContext.Current.Session["sesgyr"].ToString().Trim();} //Response.Write ("<li class='navlink'>"); //if (bcode==(i+1)) {Response.Write ("<img src='/CE/images/arrow.down.png'>");} //else {Response.Write ("<img src='/CE/images/arrow.right.png'>");} //Response.Write (" <a href='/CE/default.aspx?b="+(i+1).ToString().Trim()+"'>"+arrBlock[i]+"</a></li>"); //if (bcode==(i+1)) //{ string ugr = HttpContext.Current.Session["sesusergroup"].ToString().Trim(); Response.Write ("<div class='subnav'><ul class='navlink'>"); for (int j=0;j<arrCoreBlock.Count;j++) { Response.Write ("<li class='navlink'><img src='/CE/images/arrow.right.png'> <font color=#00646E>"+arrCoreBlock[j]+"</font></li>"); Response.Write ("<table><tr>"); if (ugr!="CLINBLOCK1CCF" && ugr!="CLINBLOCK1MHMC" && ugr!="CLINBLOCK2CCF" && ugr!="CLINBLOCK2MHMC") {Response.Write ("<td bgcolor=#b0e0e6 border=1 bordercolor=#000000><a href='/CE/Components/blockCore.aspx?b=0&k="+(j+1).ToString().Trim()+"&h=1&y="+gyr+"'><font color=#00646E>UH/VA</font></a></td>");} if (ugr!="CLINBLOCK1CCF" && ugr!="CLINBLOCK1UH" && ugr!="CLINBLOCK2CCF" && ugr!="CLINBLOCK2UH") {Response.Write ("<td bgcolor=#f4a460 border=1 bordercolor=#000000><a href='/CE/Components/blockCore.aspx?b=0&k="+(j+1).ToString().Trim()+"&h=2&y="+gyr+"'><font color=#00646E>MHMC</font></a></td>");} if (ugr!="CLINBLOCK1UH" && ugr!="CLINBLOCK1MHMC" && ugr!="CLINBLOCK2UH" && ugr!="CLINBLOCK2MHMC") Response.Write ("<td bgcolor=#adff2f border=1 bordercolor=#000000><a href='/CE/Components/blockCore.aspx?b=0&k="+(j+1).ToString().Trim()+"&h=3&y="+gyr+"'><font color=#00646E>CCF</font></a></td>"); Response.Write ("</tr></table>"); } Response.Write ("</ul></div>"); //} //} Response.Write ("</ul></div>"); %> </asp:Panel> <% Response.Write ("<hr> <img src='/CE/images/arrow.right.png'>"); Response.Write (" <a href='/CE/components/cgTime.aspx'>Timeliness</a>"); %> <br class="header3"> </div> </td> <td id="tdMain"> <div class="paddedwrapper1"></div>
When I click on the link button lnkCore, i want to expand (i.e make the panel pnlCL visible.)
But I get the following error message that "Control 'LeftNav1_lnkCore' of type 'LinkButton' must be placed inside a form tag with runat="server""
i have done similar thing in my other application, and I didnt face any problem, What could the problem be?
Please help me.. i have been at this since morning!!!!!
Thanks in advance
Last edited by peter_budo; Jan 11th, 2009 at 2:46 pm. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
•
•
Join Date: Jan 2008
Posts: 2,052
Reputation:
Solved Threads: 118
Re: Control 'LeftNav1_lnkCore' of type 'LinkButton' must be placed inside a form tag with
0
#2 Jan 7th, 2009
![]() |
Other Threads in the ASP.NET Forum
- Previous Thread: Accessing localhost problem
- Next Thread: How to implement live video streaming in asp.net
| Thread Tools | Search this Thread |
.net 2.0 3.5 activexcontrol advice ajax alltypeofvideos appliances asp asp.net bc30451 beginner bottomasp.net browser businesslogiclayer c# c#gridviewcolumn cac checkbox commonfunctions compatible confirmationcodegeneration content contenttype courier css dataaccesslayer database datagrid datagridview datagridviewcheckbox datalist development dgv dropdownlist dropdownmenu dynamically edit fileuploader fill flash flv formatdecimal forms formview gridview gudi homeedition iframe iis javascript jquery listbox menu microsoft mono mouse mssql multistepregistration nameisnotdeclared news objects opera panelmasterpagebuttoncontrols redirect registration relationaldatabases reportemail rotatepage schoolproject security serializesmo.table sessionvariables silverlight smartcard smoobjects software sql-server sqlserver2005 suse textbox tracking treeview unauthorized validatedate validation vb.net video videos virtualdirectory vista visual-studio visualstudio web webapplications webarchitecture webdevelopemnt webprogramming webservice youareanotmemberofthedebuggerusers






