Reputation: 205
I have two buttons on an asp.net (VB) form, Create and Cancel. I am using the Ajax extender confirmbutton for the Create button. Later I removed the extender. Now even though I don't have the extender the application fails when I click on the Cancel button. It gives me this error "Extender controls may not be registered before PreRender".
This is what I have on the top of the design page:
<%@ Page Title="" Language="VB" MasterPageFile="~/default.master" AutoEventWireup="false" CodeFile="CreateIncident.aspx.vb" Inherits="CreateIncident" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit.HTMLEditor" tagprefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"></asp:Content>
<asp:Content ID="Content2" runat="server" contentplaceholderid="ContentPlaceHolder1">
<ajaxToolkit:ToolkitScriptManager CombineScripts="True" runat="server" ID="ToolkitScriptManager1">
</ajaxToolkit:ToolkitScriptManager>
This is how my button looks like:
<asp:Button ID="btnCreateIncident" runat="server" Text="Create an Incident" cssclass="btnclass" CausesValidation="true"/>
<asp:Button ID="btnCancel" runat="server" Text="Cancel" cssclass="btnclass marginLR" OnClientClick="btnCancel_Click" />
Upvotes: 0
Views: 694