数据列表中的ajax Modalpopup扩展程序无法正常工作 [英] ajax Modalpopup extender inside datalist is not working
本文介绍了数据列表中的ajax Modalpopup扩展程序无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要将显示面板显示为数据列表中的弹出窗口..
仅适用于datalist中的第一个数据..
不适用于datalist中的剩余数据。
i尝试过这样......
< asp:DataList ID = data_list runat = server
style = margin-right:inherit 宽度 = 627px >
< span class =code-keyword>< ItemTemplate >
< table style = border-bottom:1px点缀黑色; >
< tr >
< td colspan = 2 width = 597px >
< asp:Label ID = titleLabel class = latestitem_div_heading runat = server 文本 =' <% #Eval( title)%> ' style = font-size:small / >
< / td >
< td > < / td >
< / tr >
< tr >
< td colspan = 2 宽度 = 597px >
< div class = itemtext >
< asp:标签 ID = deseriptionLabel runat = server < span class =code-attribute>
文字 =' <% #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 高度 = 30 宽度 = 100 / >
< asp:ModalPopupExtender ID = suggestionpopup runat = server BehaviorID = sugg TargetControlID = btnsug CancelControlID = close PopupControlID = suggs Backgroun dCssClass = ajaxst >
< / asp:ModalPopupExtender >
< / td >
< / tr >
< / table >
< / ItemTemplate >
< / asp:DataList &g t;
< asp:Panel ID = suggs runat = server CssClass = login1 >
< div style = float:right; margin-left:30px; > < asp:ImageButton ID = close
< span class =code-attribute> runat = server 宽度 = 16 ImageUrl = 〜/ images / close12.png CssClass = popup1
< span class =code-attribute> OnClientClick = imgbtnclose_Click / > < / div >
< h1 > 建议< / h1 >
< asp:TextBox ID = TxtUserName1 runat = serv呃 class < span class =code-keyword> = login-input 占位符 = 名称 > < / asp:TextBox >
< asp:FilteredTextBoxExtender ID = FilteredTextBoxExtender4 TargetControlID = TxtUserName1 FilterType = Custom,UppercaseLetters,LowercaseLetters ValidChars = runat = server >
< / asp:FilteredTextBoxExtender >
< asp:TextBox runat < span class =code-keyword> = server ID = TxtEmailID class = login-input 占位符 = Email_ID > < / asp:TextBox >
< asp:RegularExpressionValidator ID = RegularExpressionValidator1 runat = 服务器 ForeColor = 白色
< span class =code-attribute> ErrorMessage = 输入正确的电子邮件 ControlToValidate = TxtEmailID < span class =code-attribute> 字体大小 = 小
ValidationExpression = ^ [a-zA-Z] [\\\\ .-] * [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 = 服务器 class = login-input 占位符 = 有关方案的建议 TextMode = MultiLine > < / asp :TextBox >
< asp:按钮 ID = submitbtn runat = server 文本 = 提交 value = 登录 CausesValidation = false UseSubmitBehavior = false
class = login-submit OnClick = submitbtn_Click < span class =code-keyword> / >
< / asp:Panel >
< br $> b $ b请给我一些建议..
提前感谢
解决案例
> < / asp:RegularExpressionValidator >
< asp:TextBox ID = Txtsuggestion runat = 服务器 class < span class =code-keyword> = login-input 占位符 = 有关方案的建议 TextMode = MultiLine > < / asp:TextBox >
< asp:按钮 ID = submitbtn runat = server 文字 = 提交 价值 = 登录 CausesValidation = < span class =code-keyword> false UseSubmitBehavior = false
class= login-submit OnClick = submitbtn_Click / >
< / asp:面板 >
请给我一些建议。 。
提前感谢
试试这个
< pre lang =xml> < 表格 id = form1 < span class =code-属性> runat = server >
< asp:ToolkitScriptManager ID = ToolkitScriptManager1 runat = 服务器 >
< span class =code-keyword>< / asp:ToolkitScriptManager > $ b$b <asp:DataList ID= \"data_list\" runat=\"server\"
style=\"margin-right:inherit\" Width=\"627px\">CssClass=\"login1\" style=\"display:none;\">
<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:ima gebutton 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\"
<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=\"serv er\" 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> 跨度>
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...
<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
解决方案
" ></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
Try this
<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>
这篇关于数据列表中的ajax Modalpopup扩展程序无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文