StrataFrame Forum

Event Handler code not running

http://forum.strataframe.net/Topic30775.aspx

By Marcia G Akins - 1/5/2012

Hi all.

I am a real dummy when it comes to web apps so I can use all the help I can get Smile

I have a simple web form on which I want to populate a date field when the user selects the value "Y" in a dtrop down list.

This is the definition for the drop down list:

<SFWeb:DropDownList ID="ddlSigned" runat="server" PopulationType="BusinessObject"

BindingField="signed" BusinessObjectName="SignOff"

onselectedindexchanged="ddlSigned_SelectedIndexChanged">

<PopulationDataSourceSettings BusinessObjectType="CI_BusinessObjects.boYesNo"

DisplayFieldNamesAlternate="dtl_dsc|" DropDownFormatString=""

FormatString="{0}" MethodToExecute="GetYesNo;" ValueMember="dtl_cde" />

</SFWeb:DropDownList>

protected void ddlSigned_SelectedIndexChanged(object sender, EventArgs e)
{
  if (ddlSigned.SelectedValue.ToString() == "Y")
  {
    SignOff.sign_off_dt = DateTime.Today;
    txtSignOffDate.Text = DateTime.Today.ToShortDateString();
  }
}


The code in ddlSigned_SelectedIndexChanged never gets executed. Why?

What stupid thing am I doing wring and what do I need to get it to do what I want?

TIA

Marcia

By Marcia G Akins - 1/5/2012

Well, at least I am gettinmg better at answering my own stupid questions Smile

I forgot to set the drop down list up with AutoPostback = true.

Wish all my problems could be solved this easily Smile