<div style="position: relative;">
<asp:Label ID="LB_Tex" runat="server" Text="放行單號:" ForeColor="Blue" Font-Size="16pt" Font-Underline="True"></asp:Label>
<span style="margin-left: 532px; width: 18px; overflow: hidden;">
<asp:DropDownList ID="DDL_Rel" runat="server" Style="width: 260px; margin-left: -532px" Font-Size="17pt" AutoPostBack="True" OnSelectedIndexChanged="DDL_Rel_SelectedIndexChanged" >
</asp:DropDownList>
</span>
<asp:TextBox ID="TB_Rel" runat="server" Style="width: 238px; position: absolute; left: 470px;" Font-Size="15.5pt" AutoPostBack="True" OnTextChanged="TB_Rel_TextChanged"></asp:TextBox>
<asp:Button ID="Btn_Find" runat="server" cssClass="myButton" Text="Find" Font-Size="16pt" OnClick="Btn_Find_Click" />
<asp:Button ID="Btn_Clear" runat="server" cssClass="myButton" Text="Clear" Font-Size="16pt" OnClick="Btn_Clear_Click" />
</div>
protected void DDL_Rel_SelectedIndexChanged(object sender, EventArgs e) { TB_Rel.Text = DDL_Rel.SelectedItem.Text; } protected void TB_Rel_TextChanged(object sender, EventArgs e) { try { DDL_Rel.SelectedValue = TB_Rel.Text; } catch { TB_Rel.Text = DDL_Rel.SelectedValue; } }