开发者

Passing a selected value in the grid view to a pop up panel in the same page

I have a button which redirects the page when clicked, it also pass the selected Email (from the grid) value to the SendMessage.aspx page. Now without redirecting I made a panel and few labels and text box inside the panel as popup for the send button I want to pass the selected email value to a text box field inside the panel. How should i change my code so that the text box inside the pop up panel gets the selected value. thanks

<asp:Button ID="SendButton" Enabled="True" Width="70" runat="server" PostBackUrl='<%# Eval("Email", "SendMessage.aspx?Email={0}") %>' Text='Send' />    
<a开发者_如何学编程sp:PopupControlExtender ID="PopUCtrlExt_SendMSg"  runat="server" DynamicServicePath="" Enabled="True" ExtenderControlID="" TargetControlID="SendButton" PopupControlID="Panel_sendmsg" />


Make an OnClick event on your button. Place a label (lblEmailAddress for eg) in your Panel_sendmsg. Then simply in your buttons OnClick event write: lblEmailAddress.Text = address (grab the address from the grid) then call PopUCtrlExt_SendMSg.Show(). Thats it. :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜