drop list question

S

Sze

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
 
G

Guest

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
 
Z

Zhi-Qiang Ni[MSFT]

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
==================================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,152
Members
46,698
Latest member
LydiaHalle

Latest Threads

Top