Results 1 to 7 of 7

Thread: ScriptManager is required on the page to use ASP.NET AJAX Script Components

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member nUflAvOrS's Avatar
    Join Date
    Jul 2007
    Location
    Malaysia/ Currently at Singapore
    Posts
    372

    ScriptManager is required on the page to use ASP.NET AJAX Script Components

    ---------------------------------------------------------------
    My page contains a scriptmanager and updatepanel.
    What I would like to do is when user click on the checkbox within the gridview which is embeded inside a updatepanel. The gridview will changed the editindex into particular selected row index.

    My code is here :

    vb Code:
    1. Protected Sub chkSelect_CheckedChanged(ByVal sender As Object, ByVal e As EventArgs)
    2.         If IsPostBack Then
    3.             Dim cb As CheckBox = DirectCast(sender, CheckBox)
    4.             If cb IsNot Nothing Then
    5.                 If cb.Checked Then
    6.                     Dim row As GridViewRow = DirectCast(cb.NamingContainer, GridViewRow)
    7.                     Dim index As Integer = row.RowIndex
    8.                     With grdListOfItem
    9.                         .EditIndex = index
    10.                         .DataSource = (CType(Session("myDatatable3"), DataTable)).DefaultView
    11.                         .DataBind()
    12.                     End With
    13.                 End If
    14.             End If
    15.         End If
    16.     End Sub

    asp Code:
    1. <asp:TemplateField>
    2.                 <HeaderTemplate>
    3.                     <asp:CheckBox ID="chkHeader" runat="server"  />
    4.                 </HeaderTemplate>
    5.                 <ItemTemplate>
    6.                     <asp:CheckBox ID="chkSelect" runat="server"  AutoPostBack = "true" OnCheckedChanged = "chkSelect_CheckedChanged"/>
    7.                 </ItemTemplate>
    8.             </asp:TemplateField>

    But I get an error on .databind()
    ---------------------
    System.InvalidOperationException was unhandled by user code Message="A ScriptManager is required on the page to use ASP.NET AJAX Script Components." Source="AjaxControlToolkit"
    Hope someone can help me. Thanks a lot.
    Last edited by nUflAvOrS; Mar 23rd, 2009 at 11:22 PM.
    Where there is no hope, there can be no endeavor.

    There are two ways of rising in the world, either by your own industry or by the folly of others.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width