Congratulations to all the winners of April 2013, they have won INR 3400 cash and INR 20147 worth prizes !
DotNetFunda.Com Logo
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 36936 |  Welcome, Guest!   Register  Login
  Home > Community Home >

Need help on dropdownlist

 Author: lightblue423 | Posted on: 6/17/2008 6:21:01 PM | Views: 55

Recommend an Articles | Recommended Articles | Search Resources | Community Home |




I am using dreamweaver to build my first asp.net application, I am creating a form that has a dropdownlist of employees in the company. It is a dynamic dropdown list.  What I am trying to do is to add a "please select" item into this dropdown list but I was not able to get it to work. It still defaults to the first item from the database. I've been trying to figure this out for couple days but no luck and I don't know what I did wrong, I hope that someone could help me out here. Here is the codes:

 <script runat="server">
Sub Page_Load(Src As Object, E As EventArgs)
If NOT IsPostBack Then
Attendee1.DataSource = rsEmployees.DefaultView
Attendee1.DataTextField="fullName"
Attendee1.DataValueField="ID"
Attendee1.DataBind()
Attendee1.Items.Insert(0,"please select")
End If
End Sub
</script>

Inside Form tag, I have:

<asp:Drop ... Go to the complete details ...

Found interesting? Add this to:


About Us | Contact Us | The Team | Advertise | Software Development | Write for us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you find plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 5/20/2013 5:20:36 AM