rckrch
asked on
Button not working to show popup.
I have an asp.net page with a panel (with scroll bars) inside a panel with an update panel. The button (MstrQLst) used for making the popup visible requires 2 clicks to work.
Can someone help?
Thanks,
Can someone help?
Thanks,
<asp:Table ID="Table1" runat="server" Width="100%" CellPadding="0" CellSpacing="0"
Height="25px">
<asp:TableRow ID="TableRow2" runat="server" Width="100%" BackColor="#336699" Height="100%">
<asp:TableCell ID="TableCell2" runat="server" Width="90%" HorizontalAlign="Left"
Height="100%">
<asp:Button ID="MstrQLst" runat="server" Text="Master Question Library" Font-Names="Arial" Font-Size="10"
Font-Underline="True" ForeColor="#FFFFCC" BackColor="Transparent" BorderStyle="None"
Font-Bold="True" CausesValidation="False" OnClick="MstrQLst_Click" />
</asp:TableCell>
</asp:TableRow>
</asp:Table>
<asp:Panel ID="CoreQuest2" runat="server" Width="40%" Visible="False" ViewStateMode="Enabled"
BackColor="#E9E9E9" BorderColor="#999999" BorderStyle="Inset" BorderWidth="1"
HorizontalAlign="Center" Height="50%">
<asp:Table ID="Table6" runat="server" Width="100%" BorderColor="#003366" BorderStyle="Inset"
BorderWidth="1" Height="30px" ViewStateMode="Enabled" HorizontalAlign="Left"
BackImageUrl="~/Images/BlueBGGrad.png">
<asp:TableRow ID="TableRow5" runat="server">
<asp:TableCell ID="TableCell15" runat="server" Width="100%" Height="100%" BackColor="Transparent"
BorderStyle="None" VerticalAlign="Middle" HorizontalAlign="Left">
<asp:Label ID="Label5" runat="server" Text="Core Question Library" ForeColor="#FFFFCC"
Font-Size="10pt" Font-Names="Arial" BackColor="Transparent" BorderStyle="None"
CssClass="LableLeftAlign" Width="100%" Font-Bold="True">
</asp:Label>
</asp:TableCell></asp:TableRow>
</asp:Table>
<asp:Panel ID="CoreQuest" runat="server" Width="100%" Visible="True" ViewStateMode="Enabled"
BackColor="#E9E9E9" HorizontalAlign="Center" Height="80%" ScrollBars="Vertical">
<asp:UpdatePanel ID="UpDtCoreQuest" runat="server" UpdateMode="Conditional" ViewStateMode="Enabled">
<ContentTemplate>
<br />
<asp:GridView ID="CoreQuestGrdVw" runat="server" AlternatingRowStyle-BackColor="#CCCCCC"
BackColor="White" BorderColor="#003366" BorderStyle="Inset" BorderWidth="2px"
EnablePersistedSelection="True" Font-Bold="False" Font-Names="Arial" Font-Size="10pt"
ForeColor="#003366" GridLines="Vertical" HeaderStyle-BackColor="#336699" HeaderStyle-BorderColor="#003366"
HeaderStyle-BorderStyle="Inset" HeaderStyle-BorderWidth="1" HeaderStyle-ForeColor="#FFFFCC"
HeaderStyle-Height="20" HeaderStyle-HorizontalAlign="Center" HeaderStyle-VerticalAlign="Middle"
HeaderStyle-Wrap="False" HorizontalAlign="Center" RowStyle-BackColor="White"
RowStyle-ForeColor="#003366" RowStyle-HorizontalAlign="Center" RowStyle-VerticalAlign="Middle"
SelectedRowStyle-ForeColor="#003366" ViewStateMode="Enabled" Width="80%" DataKeyNames="RecordID"
AutoGenerateColumns="False" Height="75%" ShowFooter="True" DataSourceID="CoreQuestDataSource"
OnRowCommand="CoreQuestGrdVw_RowCommand" ShowHeaderWhenEmpty="True" EnableModelValidation="True">
<EditRowStyle BackColor="#FF5050" ForeColor="Black" HorizontalAlign="Center" VerticalAlign="Middle"
Width="95%" />
<Columns>
<asp:CommandField ShowEditButton="true" ItemStyle-Width="5%" />
<asp:TemplateField Visible="False">
<ItemTemplate>
<asp:HiddenField runat="server" ID="RecordID" Value='<%# Bind("RecordID") %>' Visible="false" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="True" ItemStyle-Wrap="False" ItemStyle-HorizontalAlign="Center">
<FooterTemplate>
<asp:LinkButton ID="FtrInsrtBtn2" runat="server" Text="Insert" CommandName="Insert"
BackColor="Transparent" BorderStyle="None" Font-Names="Arial" Font-Size="10"
ForeColor="#003366" Font-Underline="True" />
<asp:LinkButton ID="FtrCncltBtn2" runat="server" Text="Cancel" CommandName="Cancel"
BackColor="Transparent" BorderStyle="None" Font-Names="Arial" Font-Size="10"
ForeColor="#003366" Font-Underline="True" />
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Work Cell Specific Questions" HeaderStyle-ForeColor="#FFFFCC"
HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="80%"
FooterStyle-Width="80%">
<ItemTemplate>
<asp:Label runat="server" ID="lblWCQ" Text='<%# Bind("WorkCell_Specific") %>'>
</asp:Label></ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtWCQ" runat="server" Width="95%" Text='<%# Bind("WorkCell_Specific") %>'
TextMode="MultiLine" Font-Size="10" Font-Names="Arial" ForeColor="#003366" CssClass="hidescrollbars">
</asp:TextBox></EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="ftrtxtWCQ" runat="server" Width="95%" Font-Names="Arial" Font-Size="10"
ForeColor="#003366" TextMode="MultiLine" CssClass="hidescrollbars">
</asp:TextBox></FooterTemplate>
</asp:TemplateField>
</Columns>
<EmptyDataTemplate>
<asp:Table ID="Table7" runat="server" Width="100%">
<asp:TableRow ID="TableRow8" runat="server">
<asp:TableCell ID="TableCell18" runat="server" Width="20%" HorizontalAlign="Center">
<asp:LinkButton runat="server" ID="EmptyInsert" CommandName="EmptyInsert" Text="Insert"
BackColor="Transparent" BorderStyle="None" Font-Names="Arial" Font-Size="10"
Font-Underline="True" ForeColor="#003366">
</asp:LinkButton>
<asp:LinkButton runat="server" ID="EmptyCancel" CommandName="EmptyCancel" Text="Cancel"
BackColor="Transparent" BorderStyle="None" Font-Names="Arial" Font-Size="10"
Font-Underline="True" ForeColor="#003366">
</asp:LinkButton>
</asp:TableCell><asp:TableCell ID="TableCell19" runat="server" Width="80%" HorizontalAlign="Center">
<asp:TextBox runat="server" ID="txtemptyWCInsrt" Width="90%" BackColor="White" BorderColor="#CCCCCC"
BorderStyle="Solid" BorderWidth="1" Font-Names="Arial" Font-Size="10" ForeColor="#003366"
TextMode="MultiLine" CssClass="hidescrollbars">
</asp:TextBox>
</asp:TableCell></asp:TableRow>
</asp:Table>
</EmptyDataTemplate>
</asp:GridView>
<asp:GridView ID="QSCoreQuestGrdVw" runat="server" AlternatingRowStyle-BackColor="#CCCCCC"
BackColor="White" BorderColor="#003366" BorderStyle="Inset" BorderWidth="2px"
EnablePersistedSelection="True" Font-Bold="False" Font-Names="Arial" Font-Size="10pt"
ForeColor="#003366" GridLines="Vertical" HeaderStyle-BackColor="#336699" HeaderStyle-BorderColor="#003366"
HeaderStyle-BorderStyle="Inset" HeaderStyle-BorderWidth="1" HeaderStyle-ForeColor="#FFFFCC"
HeaderStyle-Height="20" HeaderStyle-HorizontalAlign="Center" HeaderStyle-VerticalAlign="Middle"
HeaderStyle-Wrap="False" HorizontalAlign="Center" RowStyle-BackColor="White"
RowStyle-ForeColor="#003366" RowStyle-HorizontalAlign="Center" RowStyle-VerticalAlign="Middle"
SelectedRowStyle-ForeColor="#003366" ViewStateMode="Enabled" Width="80%" DataKeyNames="RecordID"
AutoGenerateColumns="False" Height="75%" ShowFooter="True" DataSourceID="QSCoreQuestDataSource"
OnRowCommand="QSCoreQuestGrdVw_RowCommand" ShowHeaderWhenEmpty="True" EnableModelValidation="True">
<EditRowStyle BackColor="#FF5050" ForeColor="Black" HorizontalAlign="Center" VerticalAlign="Middle"
Width="95%" />
<Columns>
<asp:CommandField ShowEditButton="true" ItemStyle-Width="5%" />
<asp:TemplateField Visible="False">
<ItemTemplate>
<asp:HiddenField runat="server" ID="RecordID" Value='<%# Bind("RecordID") %>' Visible="false" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="True" ItemStyle-Wrap="False" ItemStyle-HorizontalAlign="Center">
<FooterTemplate>
<asp:LinkButton ID="FtrInsrtBtn2" runat="server" Text="Insert" CommandName="Insert"
BackColor="Transparent" BorderStyle="None" Font-Names="Arial" Font-Size="10"
ForeColor="#003366" Font-Underline="True" />
<asp:LinkButton ID="FtrCncltBtn2" runat="server" Text="Cancel" CommandName="Cancel"
BackColor="Transparent" BorderStyle="None" Font-Names="Arial" Font-Size="10"
ForeColor="#003366" Font-Underline="True" />
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Quality System Specific Questions" HeaderStyle-ForeColor="#FFFFCC"
HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="80%"
FooterStyle-Width="80%">
<ItemTemplate>
<asp:Label runat="server" ID="lblQSQ" Text='<%# Bind("QSystem_Specific") %>'>
</asp:Label></ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtQSQ" runat="server" Width="95%" Text='<%# Bind("QSystem_Specific") %>'
TextMode="MultiLine" Font-Size="10" Font-Names="Arial" ForeColor="#003366" CssClass="hidescrollbars">
</asp:TextBox></EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="ftrtxtQSQ" runat="server" Width="95%" Font-Names="Arial" Font-Size="10"
ForeColor="#003366" TextMode="MultiLine" CssClass="hidescrollbars">
</asp:TextBox></FooterTemplate>
</asp:TemplateField>
</Columns>
<EmptyDataTemplate>
<asp:Table ID="Table7" runat="server" Width="100%">
<asp:TableRow ID="TableRow7" runat="server">
<asp:TableCell ID="TableCell16" runat="server" Width="20%" HorizontalAlign="Center">
<asp:LinkButton runat="server" ID="EmptyInsert" CommandName="EmptyInsert" Text="Insert"
BackColor="Transparent" BorderStyle="None" Font-Names="Arial" Font-Size="10"
Font-Underline="True" ForeColor="#003366">
</asp:LinkButton>
<asp:LinkButton runat="server" ID="EmptyCancel" CommandName="EmptyCancel" Text="Cancel"
BackColor="Transparent" BorderStyle="None" Font-Names="Arial" Font-Size="10"
Font-Underline="True" ForeColor="#003366">
</asp:LinkButton>
</asp:TableCell><asp:TableCell ID="TableCell17" runat="server" Width="80%" HorizontalAlign="Center">
<asp:TextBox runat="server" ID="txtemptyQSInsrt" Width="90%" BackColor="White" BorderColor="#CCCCCC"
BorderStyle="Solid" BorderWidth="1" Font-Names="Arial" Font-Size="10" ForeColor="#003366"
TextMode="MultiLine" CssClass="hidescrollbars">
</asp:TextBox>
</asp:TableCell>
</asp:TableRow>
</asp:Table>
</EmptyDataTemplate>
</asp:GridView>
<asp:GridView ID="MfgCoreQuestGrdVw" runat="server" AlternatingRowStyle-BackColor="#CCCCCC"
BackColor="White" BorderColor="#003366" BorderStyle="Inset" BorderWidth="2px"
EnablePersistedSelection="True" Font-Bold="False" Font-Names="Arial" Font-Size="10pt"
ForeColor="#003366" GridLines="Vertical" HeaderStyle-BackColor="#336699" HeaderStyle-BorderColor="#003366"
HeaderStyle-BorderStyle="Inset" HeaderStyle-BorderWidth="1" HeaderStyle-ForeColor="#FFFFCC"
HeaderStyle-Height="20" HeaderStyle-HorizontalAlign="Center" HeaderStyle-VerticalAlign="Middle"
HeaderStyle-Wrap="False" HorizontalAlign="Center" RowStyle-BackColor="White"
RowStyle-ForeColor="#003366" RowStyle-HorizontalAlign="Center" RowStyle-VerticalAlign="Middle"
SelectedRowStyle-ForeColor="#003366" ViewStateMode="Enabled" Width="80%" DataKeyNames="RecordID"
AutoGenerateColumns="False" Height="75%" ShowFooter="True" DataSourceID="MfgCoreQuestDataSource"
OnRowCommand="MfgCoreQuestGrdVw_RowCommand" ShowHeaderWhenEmpty="True" EnableModelValidation="True">
<EditRowStyle BackColor="#FF5050" ForeColor="Black" HorizontalAlign="Center" VerticalAlign="Middle"
Width="95%" />
<Columns>
<asp:CommandField ShowEditButton="true" ItemStyle-Width="5%" />
<asp:TemplateField Visible="False">
<ItemTemplate>
<asp:HiddenField runat="server" ID="RecordID" Value='<%# Bind("RecordID") %>' Visible="false" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="True" ItemStyle-Wrap="False" ItemStyle-HorizontalAlign="Center">
<FooterTemplate>
<asp:LinkButton ID="FtrInsrtBtn2" runat="server" Text="Insert" CommandName="Insert"
BackColor="Transparent" BorderStyle="None" Font-Names="Arial" Font-Size="10"
ForeColor="#003366" Font-Underline="True" />
<asp:LinkButton ID="FtrCncltBtn2" runat="server" Text="Cancel" CommandName="Cancel"
BackColor="Transparent" BorderStyle="None" Font-Names="Arial" Font-Size="10"
ForeColor="#003366" Font-Underline="True" />
</FooterTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Manufacturing System Specific Questions" HeaderStyle-ForeColor="#FFFFCC"
HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="80%"
FooterStyle-Width="80%">
<ItemTemplate>
<asp:Label runat="server" ID="lblMSQ" Text='<%# Bind("MfgSystem_Specific") %>'>
</asp:Label></ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtMSQ" runat="server" Width="95%" Text='<%# Bind("MfgSystem_Specific") %>'
TextMode="MultiLine" Font-Size="10" Font-Names="Arial" ForeColor="#003366" CssClass="hidescrollbars">
</asp:TextBox></EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="ftrtxtMSQ" runat="server" Width="95%" Font-Names="Arial" Font-Size="10"
ForeColor="#003366" TextMode="MultiLine" CssClass="hidescrollbars">
</asp:TextBox></FooterTemplate>
</asp:TemplateField>
</Columns>
<EmptyDataTemplate>
<asp:Table ID="Table7" runat="server" Width="100%">
<asp:TableRow runat="server">
<asp:TableCell runat="server" Width="20%" HorizontalAlign="Center">
<asp:LinkButton runat="server" ID="EmptyInsert" CommandName="EmptyInsert" Text="Insert"
BackColor="Transparent" BorderStyle="None" Font-Names="Arial" Font-Size="10"
Font-Underline="True" ForeColor="#003366">
</asp:LinkButton>
<asp:LinkButton runat="server" ID="EmptyCancel" CommandName="EmptyCancel" Text="Cancel"
BackColor="Transparent" BorderStyle="None" Font-Names="Arial" Font-Size="10"
Font-Underline="True" ForeColor="#003366">
</asp:LinkButton>
</asp:TableCell><asp:TableCell runat="server" Width="80%" HorizontalAlign="Center">
<asp:TextBox runat="server" ID="txtemptyMSInsrt" Width="90%" BackColor="White" BorderColor="#CCCCCC"
BorderStyle="Solid" BorderWidth="1" Font-Names="Arial" Font-Size="10" ForeColor="#003366"
TextMode="MultiLine" CssClass="hidescrollbars">
</asp:TextBox>
</asp:TableCell></asp:TableRow>
</asp:Table>
</EmptyDataTemplate>
</asp:GridView>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="CoreQuestGrdVw" EventName="RowCommand" />
<asp:AsyncPostBackTrigger ControlID="QSCoreQuestGrdVw" EventName="RowCommand" />
<asp:AsyncPostBackTrigger ControlID="MfgCoreQuestGrdVw" EventName="RowCommand" />
<asp:AsyncPostBackTrigger ControlID="CoreQDone" EventName="Click" />
<%--<asp:AsyncPostBackTrigger ControlID="MstrQLst" EventName="Click" />--%>
</Triggers>
</asp:UpdatePanel>
</asp:Panel>
<br />
<asp:Button ID="CoreQDone" runat="server" Text="Done" OnClick="CoreQDone_Click" BackColor="Transparent"
BorderStyle="None" Font-Size="10" ForeColor="#003366" Font-Underline="True" />
<asp:ModalPopupExtender ID="CoreQuestPopup" runat="server" PopupControlID="CoreQuest2"
CancelControlID="CoreQDone" Enabled="True" TargetControlID="MstrQLst" ViewStateMode="Enabled">
</asp:ModalPopupExtender>
<asp:RoundedCornersExtender ID="RoundedCornersExtender1" runat="server" BorderColor="#CCCCCC"
Enabled="True" TargetControlID="CoreQuest2" Radius="10">
</asp:RoundedCornersExtender>
<asp:RoundedCornersExtender ID="RoundedCornersExtender2" runat="server" Radius="10"
TargetControlID="Table6" Corners="Top">
</asp:RoundedCornersExtender>
</asp:Panel>
ASKER
Thanks Owen,
I have several Pop ups on this page (master). The top on in the asp page shows up just fine on the first click of the button. All other ones take 2 clicks the first time accessed. After that the user only has to click once to get the popup.
These controls are not declared in code behind all are defined in the asp.net page.
I have several Pop ups on this page (master). The top on in the asp page shows up just fine on the first click of the button. All other ones take 2 clicks the first time accessed. After that the user only has to click once to get the popup.
These controls are not declared in code behind all are defined in the asp.net page.
So that does sound like an active window issue. Do more than one pop-up at the same time, or are more than one on the screen at the same time? I have this problem in Objective-c and Swift occasionally. I wish I spoke .net, but sadly, I do not. I was just trying to relate a similar issue I have seen on Mac and iOS when the dialog or alert is not the front window. Hopefully someone else can jump in that knows this code better.
Can you post the rendered HTML?
My first guess would be the same as the others already wrote, you need to activate the button first. The other possibility would be that you need a server-roundtrip to get the page correctly rendered.
My first guess would be the same as the others already wrote, you need to activate the button first. The other possibility would be that you need a server-roundtrip to get the page correctly rendered.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Since I don’t speak this language, I do not know how to do that. But you might. Just a suggestion.