Click here to Skip to main content
16,011,585 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,
I am beginner in asp.net
I am written the program in default.aspx file

XML
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication9._Default" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


    <div>
    <ajaxToolkit:ModalPopupExtenderID="ModalPopupExtender1" runat="server"

TargetControlID="lnkPopup"

PopupControlID="panEdit"

BackgroundCssClass="modalBackground"

CancelControlID="btnCancel"

PopupDragHandleControlID="panEdit">

</ajaxToolkit:ModalPopupExtender>



<asp:PanelID="panEdit"runat="server"Height="180px"Width="400px"CssClass="ModalWindow">

        <h1>Edit/h1>

        <table width="100%">

            <tr>

                <td class="formtext" style="height: 23px; width: 150px;" align="left">

                    Fields1:

                </td>

                <td>

                    <asp:TextBox ID="txtFields1" runat="server"></asp:TextBox>

                </td>

            </tr>

       </table>

       <br />

       <asp:Button ID="Button1" runat="server" Text="Update" OnClick="btnUpdate_Click"/>

       <asp:Button ID="btnCancel" runat="server" Text="Cancel" />

</asp:Panel>

<a id="lnkPopup" runat="server">Show Popup</a>

    </div>




add style sheet style1.css


CSS
.modalBackground

{

  background-color:#CCCCFF;

  filter:alpha(opacity=40);

  opacity:0.5;

}







.ModalWindow

{

  border: solid1px#c0c0c0;

  background:#f0f0f0;

  padding: 0px10px10px10px;

  position:absolute;

  top:-1000px;

}




error display like these...

XML
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Could not load file or assembly 'AjaxControlToolkit' or one of its dependencies. The system cannot find the file specified.

Source Error:


Line 1:  <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="gridview._Default" %>
Line 2:  <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>
Line 3:  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Line 4:


Source File: /Default.aspx    Line: 2

Assembly Load Trace: The following information can be helpful to determine why the assembly 'AjaxControlToolkit' could not be loaded.


=== Pre-bind state information ===
LOG: User = COMPUTER-5F4BA4\Administrator
LOG: DisplayName = AjaxControlToolkit
 (Partial)
LOG: Appbase = file:///E:/Vinay/gridview/gridview/
LOG: Initial PrivatePath = E:\Vinay\gridview\gridview\bin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: E:\Vinay\gridview\gridview\web.config
LOG: Using machine configuration file from C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: The same bind was seen before, and was failed with hr = 0x80070002.




How to recover from these problem..
Posted

This error usually comes due to following two reasons:

1.the required(AjaxControlToolkit) assembly is not added to the references of your project.

2.the required package is not installed properly. Installed it from here:

http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=4712[^]

hope it helps :)
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900