views:

1539

answers:

0

hi,all: I have a content page with some buttons and a listview wrappered with updatepanel, and with scriptmanager control in site.master page. In my content page, button1_click() enable the insertitem template to insert master record, and I want to insert detail records by clicking button2, in button2_click event, maybe first I need to obtain the ID of the selected master record's item_ID, then append the ID to the tb_show()'s URL, and call the tb_show function instead of onclientclick of button2. in short, in button2's click event to open a thickbox using tb_show() because I want to first to obtain some value to act as parameter of add_details.aspx. Thanks!

 `<asp:UpdatePanel ID="UpdatePanel1" runat="server">
 <ContentTemplate>
 <div id="content_buttons" style=" float:left; width: 99%; height: 20px; background-color: Gray; padding:5px;">
<asp:Button ID="Button1" runat="server" Text="new_record" onclick="Button1_Click" />
<asp:Button ID="Button2" runat="server" Text="new_details" onclick="Button2_Click" 
 onclientclick="javascript:tb_show('new_details','http://url/add_details.aspx'+'TB_iframe=true&amp;height=450&amp;width=550&amp;modal=true',false);"/&gt;
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>    
</div>
<div id="ListviewResult" style="float:left;width: 100%;overflow: scroll;">
 <asp:ListView ID="ListView1" runat="server" DataKeyNames="cqhu_id" 
     DataSourceID="LinqDataSource1" InsertItemPosition="None" 
     OnItemUpdating="ListView1_ItemUpdating" OnItemInserting="ListView1_ItemInserting"
         OnItemCommand="ListView1_ItemCommand" 
     onselectedindexchanged="ListView1_SelectedIndexChanged1">
     ............`

related questions