Click here to Skip to main content
15,894,825 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need to display suggestion panel as a popup inside datalist..

its working for first data in datalist only..

not working for remaining data in datalist.

i have tried like this...

XML
<asp:DataList ID="data_list" runat="server"
                  style="margin-right:inherit" Width="627px">
                  <ItemTemplate>
                      <table style="border-bottom:1px dotted black;">
              <tr>
               <td colspan="2" width="597px">
               <asp:Label ID="titleLabel" class="latestitem_div_heading" runat="server" Text='<%# Eval("title") %>'  style="font-size :small "/>
                </td>
                <td></td>
              </tr>
              <tr>
               <td colspan="2" width="597px">

               <div class="itemtext">

               <asp:Label ID="deseriptionLabel"  runat="server"
                          Text='<%#Eval("deseription") %>' /></div>


                      </td>
                      </tr>
               <tr >
               <td align="right" width="30px">
<asp:imagebutton id="btnsug" runat="server"  commandargument='<%# Eval("id") %>' imageurl="~/images/button-suggestion.png" Height="30" Width="100"  />
            <asp:ModalPopupExtender ID="suggestionpopup" runat="server" BehaviorID="sugg" TargetControlID="btnsug" CancelControlID="close" PopupControlID ="suggs" BackgroundCssClass="ajaxst">
    </asp:ModalPopupExtender>
               </td>
              </tr>
              </table>

                  </ItemTemplate>
              </asp:DataList>

<asp:Panel ID ="suggs" runat ="server" CssClass="login1">
    <div style="float:right; margin-left:30px;" ><asp:ImageButton ID="close"
           runat="server" Width="16" ImageUrl="~/images/close12.png" CssClass="popup1"
           OnClientClick="imgbtnclose_Click" /></div>
           <h1>Suggestion</h1>

   <asp:TextBox ID="TxtUserName1"  runat="server"  class="login-input" placeholder="Name" ></asp:TextBox>
     <asp:FilteredTextBoxExtender ID="FilteredTextBoxExtender4" TargetControlID="TxtUserName1" FilterType="Custom,UppercaseLetters,LowercaseLetters" ValidChars=" " runat="server" >
     </asp:FilteredTextBoxExtender>

   <asp:TextBox runat="server" ID="TxtEmailID"  class="login-input" placeholder="Email_ID"  ></asp:TextBox>
   <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ForeColor="White"
                            ErrorMessage="Enter correct email" ControlToValidate="TxtEmailID" Font-Size="Small"
                            ValidationExpression="^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$" ></asp:RegularExpressionValidator>

    <asp:TextBox ID="Txtsuggestion" runat="server"  class="login-input" placeholder="Suggestion about Schemes" TextMode="MultiLine" ></asp:TextBox>

    <asp:Button ID="submitbtn" runat="server" Text="Submit" value="Login" CausesValidation="false" UseSubmitBehavior="false"
           class="login-submit" OnClick="submitbtn_Click"   />
    </asp:Panel>


kindly give me some suggestions..

thanks in advance
Posted
Comments
AndrewCharlz 30-Jul-14 2:30am    
place the popup div outside the table and create a button with style display = none and make it the target control and from codebehind on the datalist use MPE.show(); i think this will work

1 solution

Try this

XML
<form id="form1" runat="server">
    <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
    </asp:ToolkitScriptManager>
   <asp:DataList ID="data_list" runat="server"
                  style="margin-right:inherit" Width="627px">
                  <ItemTemplate>
                      <table style="border-bottom:1px dotted black;">
              <tr>
               <td colspan="2" width="597px">
               <asp:Label ID="titleLabel" class="latestitem_div_heading" runat="server" Text='<%# Eval("title") %>'  style="font-size :small "/>
                </td>
                <td></td>
              </tr>
              <tr>
               <td colspan="2" width="597px">

               <div class="itemtext">

               <asp:Label ID="deseriptionLabel"  runat="server"
                          Text='<%#Eval("deseription") %>' /></div>


                      </td>
                      </tr>
               <tr >
               <td align="right" width="30px">
<asp:imagebutton id="btnsug" runat="server"  commandargument='<%# Eval("id") %>' imageurl="~/images/button-suggestion.png" Height="30" Width="100"  />
            <asp:ModalPopupExtender ID="suggestionpopup" runat="server" BehaviorID="sugg" TargetControlID="btnsug" CancelControlID="close" PopupControlID ="suggs" BackgroundCssClass="ajaxst">
    </asp:ModalPopupExtender>
               </td>
              </tr>
              </table>

                  </ItemTemplate>
              </asp:DataList>

<asp:Panel ID ="suggs" runat ="server" CssClass="login1" style="display:none;">
    <div style="float:right; margin-left:30px;" ><asp:ImageButton ID="close"
           runat="server" Width="16" ImageUrl="~/images/close12.png" CssClass="popup1"
           OnClientClick="imgbtnclose_Click" /></div>
           <h1>Suggestion</h1>

   <asp:TextBox ID="TxtUserName1"  runat="server"  class="login-input" placeholder="Name" ></asp:TextBox>
     <asp:FilteredTextBoxExtender ID="FilteredTextBoxExtender4" TargetControlID="TxtUserName1" FilterType="Custom,UppercaseLetters,LowercaseLetters" ValidChars=" " runat="server" >
     </asp:FilteredTextBoxExtender>

   <asp:TextBox runat="server" ID="TxtEmailID"  class="login-input" placeholder="Email_ID"  ></asp:TextBox>
   <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ForeColor="White"
                            ErrorMessage="Enter correct email" ControlToValidate="TxtEmailID" Font-Size="Small"
                            ValidationExpression="^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$" ></asp:RegularExpressionValidator>

    <asp:TextBox ID="Txtsuggestion" runat="server"  class="login-input" placeholder="Suggestion about Schemes" TextMode="MultiLine" ></asp:TextBox>

    <asp:Button ID="submitbtn" runat="server" Text="Submit" value="Login" CausesValidation="false" UseSubmitBehavior="false"
           class="login-submit" OnClick="submitbtn_Click"   />
    </asp:Panel>
    </form>
 
Share this answer
 

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