我正在尝试开发每次单击图像时打开的页面不止弹出窗口。当我单击此图像时,会出现一个弹出菜单,其中 gridview 根据页面中的某些文本框填充了数据。问题是,当我第一次写页面时它起作用了,但后来却没有。
后面的代码是
ImageButton lb = sender as ImageButton;
string shipto = ddlShipto.SelectedValue.ToString();
TMWWS.BusinessLogic.ProfileII objPlants = new TMWWS.BusinessLogic.ProfileII(shipto);
DataTable dt = objPlants.getPlantsPerShipto();
gvPlant.DataSource = dt;
gvPlant.DataBind();
this.upPlant.Update();
//pnlPlant.Visible = true;
pnlPlant_ModalPopupExtender.Show();
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<legend>Order Header</legend>
<span class="failureNotification" style="color:green">
<asp:Literal ID="lblMessage" runat="server"></asp:Literal>
</span>
<p>
<asp:Label ID="TransactionLabel" runat="server"
AssociatedControlID="txtTransaction" Height="22px" Width="248px">Transaction Number</asp:Label>
<asp:TextBox ID="txtTransaction" runat="server" CssClass="textEntry"
Enabled="False"></asp:TextBox>
</p>
<p>
<asp:Label ID="ShipToLabel" runat="server"
AssociatedControlID="txtTransaction" Height="22px" Width="248px">ShipTo</asp:Label>
<asp:DropDownList ID="ddlShipto" runat="server" CssClass="textEntry"
></asp:DropDownList>
</p>
<p>
<asp:Label ID="FeedCodeLabel" runat="server" AssociatedControlID="txtFeedCode"
Height="21px" Width="320px">Feed Code</asp:Label>
<asp:TextBox ID="txtFeedCode" runat="server" CssClass="textEntry">888</asp:TextBox>
<asp:RequiredFieldValidator ID="FeedCodeRequired" runat="server" ControlToValidate="txtFeedCode"
CssClass="failureNotification" ErrorMessage="Feed Code is required." ToolTip="Feed Code is required."
ValidationGroup="OrderValidationGroup">*</asp:RequiredFieldValidator>
</p>
<p>
<asp:Label ID="PlantLabel" runat="server" AssociatedControlID="txtPlant"
Height="21px" Width="320px">Plant</asp:Label>
<asp:TextBox ID="txtPlant" runat="server"></asp:TextBox>
<asp:ImageButton ID="ImgBtnPlant" runat="server"
onclick="ImageButton1_Click" ImageUrl="~/Icons/Plant.png" />
</p>
<asp:UpdatePanel ID="upPlant" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Panel runat="server" Visible="false" BorderColor="Black" ID="pnlPlant">
<asp:Button ID="BtnShowDialog" Style="display:none" runat="server" Width="120" Text="Filter" />
<asp:Label ID="LblPopupHeader" runat="server" Text="Plant-Filter"></asp:Label>
<asp:GridView ID="gvPlant" runat="server" AutoGenerateColumns="False"
DataKeyNames="Plant" onrowcommand="gvPlant_RowCommand">
<Columns>
<asp:BoundField DataField="Plant" HeaderText="Plant" SortExpression="Plant" />
<asp:BoundField DataField="PlantName" HeaderText="PlantName"
SortExpression="PlantName" />
<asp:ButtonField Text="Button" />
</Columns>
</asp:GridView>
</asp:Panel>
<ajaxToolkit:ModalPopupExtender ID="pnlPlant_ModalPopupExtender" runat="server"
DynamicServicePath="" Enabled="True" TargetControlID="pnlPlant" PopupControlID="BtnShowDialog">
</ajaxToolkit:ModalPopupExtender>
</ContentTemplate>
</asp:UpdatePanel>