在这里,我试图在回发后增加 iframe 的高度,但它不起作用并且警报本身没有弹出。这是我的代码
function increaseiframesize() {
alert("aaaaaa");
$('#MainContent_IFTrendAnalysis').height('523');
}
和
protected void lnkBTNSubmit_Click(object sender, EventArgs e
{
TextBox txtTextBoxRetailGroup = (TextBox)uscRetailParameters.FindControl("txtRetailCustomerGroup");
TextBox txtTextBoxPPGroup = (TextBox)uscRetailParameters.FindControl("txtProductGroup");
if (txtTextBoxRetailGroup.Text != string.Empty && txtTextBoxPPGroup.Text != string.Empty && txtATrendStartDate.Text != string.Empty && txtATrendEndDate.Text != string.Empty)
{
this.IFTrendAnalysis.Attributes.Add("src", "");
ScriptManager.RegisterStartupScript(this, this.GetType(), "ScriptRegistration", "increaseiframesize();", true);
}
}
和
<asp:UpdatePanel ID="Update" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<iframe id="IFTrendAnalysis" name="IFTrendAnalysis" scrolling="auto" runat="server"
width="100%" height="403" frameborder="0"></iframe>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="imgBTNSalesTrendChart" />
<asp:AsyncPostBackTrigger ControlID="imgBTNSalesLiftChart" />
<asp:AsyncPostBackTrigger ControlID="lnkBTNSubmit" />
<asp:AsyncPostBackTrigger ControlID="imgBTNSalesLiftChart" />
<asp:AsyncPostBackTrigger ControlID="imgBTNTAEventROI" />
<asp:AsyncPostBackTrigger ControlID="imgBTNTrendAnalyzeTBL" />
</Triggers>
</asp:UpdatePanel>
有什么建议???