解决modalpopup中的问题 [英] solve the problem in modalpopup
本文介绍了解决modalpopup中的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是asp.net的新手
我在default.aspx文件中编写了程序
I am beginner in asp.net
I am written the program in default.aspx file
<%@ 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>
添加样式表style1.css
add style sheet style1.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...
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..
推荐答案
检查此链接:>>>
http://stackoverflow.com/Questions/6844443/could-not-load-file-or-assembly-ajaxcontroltoolkit-or-one-of-its-dependencies [ ^ ]
Check this link:>>>
http://stackoverflow.com/questions/6844443/could-not-load-file-or-assembly-ajaxcontroltoolkit-or-one-of-its-dependencies[^]
此错误通常是由于以下两个原因引起的:
1.所需的(AjaxControlToolkit)程序集未添加到项目的引用中.
2.所需的软件包未正确安装.从这里安装:
http://www.microsoft.com/download/zh-CN/details.aspx? displaylang = en& id = 4712 [ ^ ]
希望对您有所帮助:)
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 :)
这将解决您的问题.看看:
http://www.sitepoint.com/forums/showthread.php?462358-Ajax-problem-quot-可能无法加载文件或组装-AjaxControlToolkit-quot [ ^ ]
http://stackoverflow.com/questions/447369/configure-asp-net-site-with-asp-net-ajax-control-toolkit [
This will solve your problem. Take a look:
http://www.sitepoint.com/forums/showthread.php?462358-Ajax-problem-quot-Could-not-load-file-or-assembly-AjaxControlToolkit-quot[^]
http://stackoverflow.com/questions/447369/configure-asp-net-site-with-asp-net-ajax-control-toolkit[^]
Regards,
Eduard
这篇关于解决modalpopup中的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文