选择框触发dopostback事件
1:选择框页面
选择页面JS触发控件的fireEvent事件:
string js= "window.opener.document.Form1." + controlID + ".value='" + des + "';window.opener.document.Form1." + controlID +".fireEvent('onchange')";
2:设置控件属性AutoPostBack="true" 并添加事件onchange="javascript:__doPostBack('controlID','');"
如:
<asp:TextBox id="TextBox2"
onclick="javascript:window.open('./SelectData.aspxview=BasicView'+'&id=TextBox2'+'&tablename=BW_BasicData_MaterialGroup','Information','width=415,height=320,toolbar=no,directories=no,scrollbars=no,resize=no,menubar=no,status=no')"
onchange="javascript:__doPostBack('TextBox2','');" runat="server" AutoPostBack="True"></asp:TextBox>