Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

The Controls collection cannot be modified because the control contains code blocks (i.e. ).

$
0
0

Please Help Me For This Error...

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Registration.aspx.cs" Inherits="User_Registration" %><%@ PreviousPageType VirtualPath="~/User/Default.aspx" %><!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"><title></title><script type="text/javascript" src="../Scripts/jquery-2.1.4.js"></script><script type="text/javascript" src="../Scripts/jquery-ui-1.11.4.js"></script><link href="../Content/themes/themes/flick/jquery-ui.css" rel="stylesheet" /><link href="../Content/themes/themes/flick/theme.css" rel="stylesheet" /><script type="text/javascript" >$(document).ready(function () {$(document).tooltip({ track: true });$("#<%=txtEmail.ClientID%>").blur(function () {
                 var email = $("#<%=txtEmail.ClientID%>").val();
                    if (email != "") {$.ajax({
                            type: "POST",
                            contentType: "application/json;charset=utf-8",
                            url: "Default.aspx/CheckEmailAvailablity",
                            data: "{email:'" + email + "'}",
                            dataType: "json",
                            success: function (response) {
                                var value = response.d;
                                if (value > 0) {$("#<%=lblStatus.ClientID%>").html("<b style='color:red'>Email Id is Alerady Register Please Try Again!!!</b>");$("#<%=txtEmail.ClientID%>").focus();$("#<%=btnRegister.ClientID%>").prop("disabled", true);
                                }
                                else {$("#<%=lblStatus.ClientID%>").html("<b style='color:green'>You can Use this Email Id!!!</b>");$("#<%=btnRegister.ClientID%>").prop("disabled", false);
                                }
                            },
                            error: function (error) {
                                alert("Error:" + error.statusText);
                            }
                        });
                    }


            });
            $("#<%=txtDateOfBirth.ClientID%>").datepicker({
                changeMonth:true,
                changeYear: true,
                maxDate: 0,
                showOp:"both",
                yearRange:"-100:+0",
                dateFormat:"dd-mm-yy"
            })

             });



        </script></head><body><form id="form1" runat="server"><asp:ScriptManager ID="sp1" runat="server"></asp:ScriptManager><div style="background-color:aqua"><table><tr><td colspan="3" style="text-align:center"><h1> Register Here</h1></td></tr><tr><td>
                First Name</td><td>&nbsp;</td><td><asp:TextBox ID="txtFirstName" runat="server"></asp:TextBox>    <asp:RequiredFieldValidator ID="rfv1" runat="server" ControlToValidate="txtFirstName" ErrorMessage="First Name Required" SetFocusOnError="true" ></asp:RequiredFieldValidator></td></tr><tr><td>
                Middle Name</td><td>&nbsp;</td><td><asp:TextBox ID="txtMiddleName" runat="server"></asp:TextBox>    </td></tr><tr><td>
               Last Name</td><td>&nbsp;</td><td><asp:TextBox ID="txtLastName" runat="server"></asp:TextBox>    </td></tr><tr><td>
                Date Of Birth</td><td>&nbsp;</td><td><asp:TextBox ID="txtDateOfBirth" runat="server"></asp:TextBox> <asp:RequiredFieldValidator ID="rfv2" runat="server" ControlToValidate="txtDateOfBirth" ErrorMessage="Select Date Of Birth" ></asp:RequiredFieldValidator>&nbsp;<br /><asp:CheckBox ID="chkIsAgeSecrete" runat="server" Text="Is Age Secret" />   </td></tr><tr><td>
               Gender</td><td>&nbsp;</td><td><asp:RadioButton ID="rb1Male" runat="server" GroupName="Gender" Text="Male" Checked="true" />&nbsp;&nbsp;<asp:RadioButton ID="rb2Female" runat="server" GroupName="Gender" Text="Female" /> </td></tr><tr><td>
               Mobile No</td><td>+91</td><td><asp:TextBox ID="txtMobileNo" runat="server"></asp:TextBox>    <asp:RequiredFieldValidator ID="rfv3" runat="server" ControlToValidate="txtMobileNo" ErrorMessage="Enter Mobile Number"  ></asp:RequiredFieldValidator></td></tr><tr><td>
                Email Id</td><td>&nbsp;</td><td><asp:TextBox ID="txtEmail" runat="server"></asp:TextBox> <asp:RequiredFieldValidator ID="rfv4" runat="server" ControlToValidate="txtEmail" ErrorMessage="Email Id Required" ></asp:RequiredFieldValidator>  <br /><asp:Label ID="lblStatus" runat="server"></asp:Label></td></tr><tr><td>
                Password</td><td>&nbsp;</td><td><asp:TextBox ID="txtPassword" runat="server" TextMode="Password"></asp:TextBox> <asp:RequiredFieldValidator ID="rfv5" runat="server" ControlToValidate="txtPassword" ErrorMessage="Password Required" ></asp:RequiredFieldValidator>  </td></tr><tr><td>
                Re-Enter Password</td><td>&nbsp;</td><td><asp:TextBox ID="txtConfirmPassword" TextMode="Password" runat="server"></asp:TextBox> <asp:RequiredFieldValidator ID="rfv7" runat="server" ControlToValidate="txtConfirmPassword" ErrorMessage="Confirm Password Required"></asp:RequiredFieldValidator><asp:CompareValidator ID="cp1" runat="server" ControlToCompare="txtPassword" ControlToValidate="txtConfirmPassword" ErrorMessage="Password and Confirm Password Should be Match"></asp:CompareValidator></td></tr><tr><td></td><td></td><td><asp:Button ID="btnRegister" runat="server" Text="Register Now Its Free >>" OnClick="btnRegister_Click" BorderColor="Black" BorderStyle="Inset" Font-Bold="true" style="background-color:aqua;color:green;border-radius:10px 10px"  /></td></tr></table>    </div><asp:Panel ID="Rgistration" runat="server" Width="100%" BorderColor="Green" BorderStyle="Outset" BorderWidth="5" BackColor="Pink" style="border-radius:10px 10px"><asp:Panel ID="RgistrationTitle" runat="server" Width="100%" HorizontalAlign="Center" style="cursor:move;display:none"><b>Registration Status ! ! !</b></asp:Panel><asp:Label ID="lblRegistrationStatus" runat="server" style="display:none"></asp:Label><asp:Button ID="btnOk" runat="server" Text="Ok" /></asp:Panel><ajaxToolkit:ModalPopupExtender ID="mpe1" runat="server" TargetControlID="btnRegister" PopupControlID="Rgistration" PopupDragHandleControlID="RgistrationTitle" DropShadow="true" RepositionMode="RepositionOnWindowResizeAndScroll" OkControlID="btnOk" BackgroundCssClass="modelPoupBackground"></ajaxToolkit:ModalPopupExtender></form></body></html>

It Showing Error

Server Error in '/Way2Reminder' Application.


The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).

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: The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).

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): The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).]
   System.Web.UI.ControlCollection.Add(Control child) +12646612
   AjaxControlToolkit.ToolkitResourceManager.RegisterCssReferences(Control control) +1244
   AjaxControlToolkit.ExtenderControlBase.OnLoad(EventArgs e) +104
   System.Web.UI.Control.LoadRecursive() +71
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3178

 



Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>