PDA

View Full Version : سوال: خطا در استفاده از scriptmanager



IranVisual
پنج شنبه 05 شهریور 1388, 18:39 عصر
وقتی یک صفحه که بهش scriptmanager اضافه کردم میخواد بیاد بالا پیغام خطای زیر رو میده
تک runat=server هم وجود داره


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

Control 'ScriptManager1' of type 'ScriptManager' 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 'ScriptManager1' of type 'ScriptManager' 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 'ScriptManager1' of type 'ScriptManager' must be placed inside a form tag with runat=server.]
System.Web.UI.Page.VerifyRenderingInServerForm(Con trol control) +214
System.Web.UI.PageWrapper.System.Web.UI.IPage.Veri fyRenderingInServerForm(Control control) +12
System.Web.UI.PageRequestManager.Render(HtmlTextWr iter writer) +76
System.Web.UI.ScriptManager.Render(HtmlTextWriter writer) +53
System.Web.UI.Control.RenderControlInternal(HtmlTe xtWriter writer, ControlAdapter adapter) +53
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +310
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +24
System.Web.UI.Control.RenderChildrenInternal(HtmlT extWriter writer, ICollection children) +199
System.Web.UI.Control.RenderChildren(HtmlTextWrite r writer) +21
System.Web.UI.Page.Render(HtmlTextWriter writer) +27
System.Web.UI.Control.RenderControlInternal(HtmlTe xtWriter writer, ControlAdapter adapter) +53
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +310
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +24
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +7375




--------------------------------------------------------------------------------
Version Information: Microsoft ‎.Net Framework Version:2.0.50727.1434; ASP‎.Net Version:2.0.50727.1434

مهدی کرامتی
جمعه 06 شهریور 1388, 01:09 صبح
خودش داره دلیل خطا رو میگه:

Control 'ScriptManager1' of type 'ScriptManager' must be placed inside a form tag with runat=server.
کنترل ScriptManager ای اضافه کرده اید خارج از تگ form قرار گرفته. محل قرار گرفتنش رو اصلاح کنید و بین تگ های <form> و ‎</form>‎ قرارش بدهید.