Click here to Skip to main content
15,892,927 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

I am running with strange problem. On my page i have 2 links(link A & link B) and 2 ModalPopUpExtender. Modal 1 is called when link A is clicked and Modal 2 is called when link B is clicked.

Modal 1 contain 1 textbox and 2 button(ok and cancel)
Modal 2 contains only one ok button.

If after page load link A is clicked textbox inside Modal 1 is in disable mode. While if we click Link B and say ok in Modal 2 and again if we go to Link A then textbox is enabled.

I want textbox to be in enabled mode whenever it is called.

Neither in postback, in codebehind or through properties textbox enabled=false is set.


Can anyone suggest me with possible solutions.
Posted

Hi Sushma,

Updated Answer:
Use following code:
XML
<ajaxToolkit:ModalPopupExtender ID="mpeDecline" runat="server" TargetControlID="pnlDecline"
    PopupControlID="pnlDecline" BehaviorID="bDecline" CancelControlID="lbtnClose"
    OnCancelScript="closeClick('bDecline');" BackgroundCssClass="modalBackground"
    DropShadow="true" />
<asp:Panel runat="server" ID="pnlDecline" CssClass="modalPopup" Style="display: none;
    width: 400px;">
    <asp:Panel runat="Server" ID="pnlConnectDragHandle" CssClass="modalPopupPanel">
        <asp:Literal ID="ltrPurchaseCredits" runat="server" Text="<%$ Resources:CommonResource, Decline %>"> </asp:Literal>
    </asp:Panel>
    <table width="100%" cellpadding="5" cellspacing="0" border="0">
        <tr>
            <td style="width: 26%">
                <asp:Literal ID="ltrProjectName" runat="server" Text="<%$ Resources:CommonResource, ProjectName %>"> </asp:Literal>
            </td>
            <td style="width: 74%">
                <asp:Label runat="server" ID="lblProjectName" Text=""></asp:Label>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Literal ID="ltrBuyerReason" runat="server" Text="<%$ Resources:CommonResource, BuyerReason %>"> </asp:Literal>
            </td>
            <td>
                <asp:Label runat="server" ID="lblBuyerReason" Text=""></asp:Label>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <asp:LinkButton runat="server" ID="lbtnClose" CssClass="btn" Text="<%$ Resources:CommonResource, Close %>"></asp:LinkButton>
            </td>
        </tr>
    </table>
</asp:Panel>


call from server side using:
mpeDecline.Show()

Thanks,
Imdadhusen
 
Share this answer
 
v2
Comments
Sunasara Imdadhusen 25-Oct-10 5:42am    
If you wouldn't get result then please send your code snippet, so i can verify where you are wrong?
Dalek Dave 25-Oct-10 5:44am    
Good Answer
hance_micle 1-Dec-10 6:25am    
Yes, good answer
Thanks for reply

Mentioned properties i have already set.
Refer Below Code:

XML
<asp:Panel ID="pnlreopen" runat="server" CssClass="modalPopup" Style="width: 250px;
              display: none;">
              <table width="350px" style="border-style: solid; border-width: thin;">
                  <tr>
                      <td valign="top" align="left" class="lbl">
                          <asp:Label ID="Label2" runat="server" Text="Issue Description :"></asp:Label>
                      </td>
                      <td align="left" valign="top">
                          <asp:TextBox ID="txtissue_desc" runat="server" Height="50px" TextMode="MultiLine"
                              Enabled="true" Width="250px"></asp:TextBox>
                      </td>
                  </tr>
                  <tr>
                      <td align="center" colspan="2">
                          <asp:Button ID="btnreopen" runat="server" Text="Reopen" Font-Names="Verdana" />
                          &nbsp;
                          <asp:Button ID="btncancel" runat="server" Text="Reset" Font-Names="Verdana" />
                      </td>
                  </tr>
              </table>
          </asp:Panel>
          <asp:ModalPopupExtender ID="ModalPopupExtender2" runat="server" TargetControlID="HiddenField2"
              PopupControlID="pnlreopen" BehaviorID="B2" DropShadow="true">
          </asp:ModalPopupExtender>
<pre lang="C++"><asp:HiddenField ID="HiddenField2" runat="server" />




and from code behind on button click i am calling it as:
ModalPopupExtender2.Show()


I have not added properties CancelcontrolId because it is not required.

I am checking in IE 8.0. Can there by any version conflict of IE.
 
Share this answer
 
v2
Comments
Sunasara Imdadhusen 25-Oct-10 6:02am    
No
Sushma_Patel 25-Oct-10 6:07am    
Where i am going wrong. Can you help me to identify!
Sunasara Imdadhusen 25-Oct-10 6:12am    
i will let you know, but just copy/past my code and do let me know result.
Sushma_Patel 25-Oct-10 6:30am    
Still it's not working
Sushma_Patel 25-Oct-10 6:48am    
Thanks for all your support and suggestion. I had workaround and finally found a solution. I was missing properties PopupDragHandleControlID. As i added this in my modalpopup it works like a charm.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900