在客户端弹出并传递网格中选定行的值
<asp:Panel ID="EditPanel" runat="server" BackImageUrl="~/Light-Gray-Suede1.jpg"
CssClass="style10" Visible="True" Style="position: absolute; left: 503px; top: 1681px;
width: 411px; height: 280px; margin-right: 0px;">
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</asp:ToolkitScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:TextBox ID="txt_EditExpiresBy" runat="server" ></asp:TextBox>
<asp:TextBox ID="txt_EditTitle" runat="server" ></asp:TextBox>
<asp:Button ID="btn_EditSave" runat="server" Text="Save" onclick="btn_EditSave_Click" />
</ContentTemplate>
</asp:UpdatePanel>
</asp:Panel>
在网格视图中,我有这个按钮,当用户单击编辑按钮时,会弹出面板,并且它必须具有来自同一行的过期日期和响应日期。
<asp:ImageButton ImageUrl="~/Styles/Images/Edit.jpg" CommandName="Edit" runat="server"
ID="btnEdit" ToolTip="Edit Message" />
<asp:PopupControlExtender ID="Edit_PopupControlExtender" runat="server" DynamicServicePath=""
Enabled="True" ExtenderControlID="" TargetControlID="btnEdit" PopupControlID="EditPanel">
</asp:PopupControlExtender>
对于重定向,我传递这样的值 <%# Eval("Email", "SendMessage.aspx?Email={0}") %>。我使用该值来编写服务器端代码。但这如何在客户端完成。谢谢
<asp:Panel ID="EditPanel" runat="server" BackImageUrl="~/Light-Gray-Suede1.jpg"
CssClass="style10" Visible="True" Style="position: absolute; left: 503px; top: 1681px;
width: 411px; height: 280px; margin-right: 0px;">
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</asp:ToolkitScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:TextBox ID="txt_EditExpiresBy" runat="server" ></asp:TextBox>
<asp:TextBox ID="txt_EditTitle" runat="server" ></asp:TextBox>
<asp:Button ID="btn_EditSave" runat="server" Text="Save" onclick="btn_EditSave_Click" />
</ContentTemplate>
</asp:UpdatePanel>
</asp:Panel>
In the grid view I have this button, when the user clicks on the edit button the panel pops up and it has to have expireby and respondby date from the same row.
<asp:ImageButton ImageUrl="~/Styles/Images/Edit.jpg" CommandName="Edit" runat="server"
ID="btnEdit" ToolTip="Edit Message" />
<asp:PopupControlExtender ID="Edit_PopupControlExtender" runat="server" DynamicServicePath=""
Enabled="True" ExtenderControlID="" TargetControlID="btnEdit" PopupControlID="EditPanel">
</asp:PopupControlExtender>
For redirect I pass the value like this <%# Eval("Email", "SendMessage.aspx?Email={0}") %>. And using that value I do the server side code. But how this can be done in client side. Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
以下是在弹出窗口中显示所选行数据的解决方法(我使用我的一个网络项目的中继器完成了此操作):
使用所选行数据设置文本框,然后通过调用 .show() 显示弹出窗口
当单击网格内的按钮时调用 javascript
showPopupWithRowData()
的标记Here is work around for displaying selected row's data in popup (i did it with repeater for one of my web project):
javascript to set textboxes with selected row data and then show popup by calling .show()
markup to call javascript
showPopupWithRowData()
when clicked on button inside Grid