From: Sze on
I got a drop down list which store the company name
my aim is when user select the item from the drop down list, It will show on
the label

I try serveral method, which seems didn't action.
Any way to do ?
Thanks in advance

Private Sub ddlIssueCompanyb_SelectedIndexChanged(ByVal sender As
Object, ByVal e As System.EventArgs) Handles ddlIssueCompany.TextChanged
Me.CreateArtInsuranceMsg.Visible = True
Me.CreateArtInsuranceMsg.Text = Me.ddlIssueCompany.SelectedValue
End Sub


From: Alexey Smirnov on
On May 17, 12:05 pm, "Sze" <a...(a)abc.com> wrote:
> I got a drop down list which store the company name
> my aim is when user select the item from the drop down list, It will show on
> the label
>
> I try serveral method, which seems didn't action.
> Any way to do  ?
> Thanks in advance
>
>     Private Sub ddlIssueCompanyb_SelectedIndexChanged(ByVal sender As
> Object, ByVal e As System.EventArgs) Handles ddlIssueCompany.TextChanged
>         Me.CreateArtInsuranceMsg.Visible = True
>         Me.CreateArtInsuranceMsg.Text = Me.ddlIssueCompany.SelectedValue
>     End Sub

It sounds like you forgot to set AutoPostBack to True. The
AutoPostBack property is used to set an automatic post back when the
dropdown has been changed. More at
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.listcontrol.autopostback.aspx

Hope this helps
From: Zhi-Qiang Ni[MSFT] on
Hi Sze,

Please have a check to see if the AutoPostBack property of the DropDownList
has been set to true. Otherwise, nothing will be executed when you select
items from the DropDownList.

In additional, I have noticed that the event you coded is
ddlIssueCompany.TextChanged while the handler is
ddlIssueCompanyb_SelectedIndexChanged. So, please also have a check that
whether the DropDownList's ID is ddlIssueCompany or ddlIssueCompanyb as
well as whether the event is TextChanged or SelectedIndexChanged.

If the problem still persists, you may need to provide the HTML code of
that page here for more troubleshooting.

--
Sincerely,
Zhi-Qiang Ni
Microsoft Online Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

MSDN Managed Newsgroup support offering is for non-urgent issues where an
initial response from the community or a Microsoft Support Engineer within
2 business day is acceptable. Please note that each follow up response may
take approximately 2 business days as the support professional working with
you may need further investigation to reach the most efficient resolution.
The offering is not appropriate for situations that require urgent,
real-time or phone-based interactions. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
==================================================