Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ddl, autopostback, OnSelectedIndexChanged

Status
Not open for further replies.

BrendaD

Programmer
Jan 26, 2001
25
CA
I have two dropdown lists - the second one populated by the selection in the first.

Everything works perfectly until I add the insert behavior.

The autopostback in the first ddl is set to true BUT it fires the insert behavior instead of the function it is supposed to call:

Code:
<script runat="server">
protected void CHUChanged(Object Src, EventArgs E) 
{
	ddlSite.DataBind();
}

</script>

The tag for the ddl is:

Code:
<asp:DropDownList ID="ddlCHU" DataSource="<%# dsCHU.DefaultView %>" DataTextField="CHU" DataValueField="pkCHU" runat="server" AutoPostBack="true" OnSelectedIndexChanged="CHUChanged"></asp:DropDownList>

The post back is:

Code:
PostBackBind="false"

The SQL for the second ddl is correct as it works when there is no insert behavior on the page.

Can someone point me in the right direction so that I can fix what is wrong and let my users actually finish inputting their data before the page disappears!

TIA, Brenda
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top