<asp:UpdatePanel ID="UpdatePanel1" ChildrenAsTriggers="False" UpdateMode="Conditional" runat="server">
<ContentTemplate>
<form id="form1" runat="server" defaultbutton="btnSearch">
<div>
<asp:ScriptManager ID="ScriptManager1" EnablePartialRendering="true"
runat="server">
</asp:ScriptManager>
<script language="javascript" type="text/javascript">
var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_initializeRequest(InitializeRequest);
prm.add_endRequest(EndRequest);
var postBackElement;
function InitializeRequest(sender, args)
{
if (prm.get_isInAsyncPostBack())
args.set_cancel(true);
postBackElement = args.get_postBackElement();
if (postBackElement.id == 'btnSearch')
$get('UpdateProgress1').style.display = 'block';
}
function EndRequest(sender, args)
{
if (postBackElement.id == 'btnSearch')
$get('UpdateProgress1').style.display = 'none';
}
</script>
</div>
<asp:GridView ID>
<Columns>
<asp:TemplateField>
<HeaderTemplate>
<asp:Label ID="Label2" runat="server" Text="Status"></asp:Label>
<asp:CheckBox ID="chkSelectAll" runat="server" onclick="javascript:HighlightRow(this);"
AutoPostBack="true" ToolTip="Click here to select all checkboxes"
OnCheckedChanged="chkSelectAll_CheckedChanged"/>
</HeaderTemplate>
<ItemTemplate >
<asp:CheckBox ID="CheckBox1" onclick="javascript:HighlightRow(this);"
AutoPostBack="true" runat="server"
OnCheckedChanged="CheckBox1_CheckedChanged1" />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField
</asp:GridView>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnSearch" EventName="Click"/>
</Triggers>
</asp:UpdatePanel>
<asp:UpdateProgress ID="UpdateProgress1" AssociatedUpdatePanelID="UpdatePanel1" runat="server" ><ProgressTemplate>
<asp:Image ID="Imgwait" runat="server"
ImageUrl="~/Content/images/images/ApImages/001413_0.gif" />
<asp:Label ID="Lblwait" runat="server"
Text="Please wait while we process your request...." Font-Names="Tahoma"
Font-Size="10px" ForeColor="#990000"></asp:Label>
</ProgressTemplate>
</asp:UpdateProgress>
<div style="position: absolute;left:55%;top: 65%; vertical-align:middle; width:300px; text-align:center">
<asp:Panel ID="IMGDV" runat="server" Width="300px"
BackColor="#3D3327" Visible="False" BorderStyle="Outset">
<asp:Image ID="Image4" runat="server"
ImageUrl=" " Width="16px"
ToolTip="write your notes here for closure" />
<asp:Label ID="Label1" runat="server" CssClass="GridHeader"
Text="Please Provide note ."></asp:Label>
<table style="border-style: solid; border-width: thin; width: 100%; background-color: #D3CCC2;"><tr><td style=" text-align:center">
<asp:TextBox ID="TextBox2" Textmode="MultiLine" Height="80px" Width="250px"
CssClass="heading1" runat="server" ontextchanged="TextBox2_TextChanged"
BackColor="#D9D9CA" BorderColor="#3E1F00" BorderStyle="Inset"></asp:TextBox>
</td></tr>
</table>
<table style="border-style: outset; border-width: medium; width: 100%; background-color: #BDB2A4;">
<tr>
<td style=" text-align:left">
<asp:panel runat="server" ID="pnlsub" BackColor="#3D3327"
BorderStyle="Outset" Width="90%" ToolTip="Submit">
<asp:Button ID="Button1" runat="server" Text="Submit" CssClass="Button" BorderStyle="Solid" BorderColor="#3D3327" onclick="Button1_Click"/>
</asp:panel>
</td>
<td style=" text-align:left">
<asp:panel runat="server" ID="pnlcan" BackColor="#3D3327"
BorderStyle="Outset" Width="90%" ToolTip="Cancel">
<asp:Button ID="Button2" runat="server" Text="Cancel" CssClass="Button" BorderStyle="Solid" BorderColor="#3D3327" onclick="Button2_Click"/>
</td>
</tr>
</table>
</asp:Panel >
</div>
代码落后
protected void CheckBox1_CheckedChanged1(object sender, EventArgs e)
{
IMGDV.Visible = true;
}
选中复选框时,更改事件希望显示面板控件,但不显示面板控件
帮助…