Shepwedd
asked on
Can I set default prompt text for an asp.net dropdownlist control?
I have written the attached code within the frontend of my asp.net C# web site using visual studio 2008. Is it possible to set prompt text in the dropdownlist ("Please select from...") without actually writting the text within my database table?
<asp:DropDownList
ID="PartnerInsertDDL"
runat="server"
CssClass="ddlPartnerFeeExec"
DataTextField="PartnerDescription"
DataValueField="PartnerCode"
DataSourceID="PartnerInsertDataSource">
</asp:DropDownList>
<asp:LinqDataSource
ID="PartnerInsertDataSource"
ContextTypeName="TrustSystemDataContext"
TableName="PartnerLookups"
runat="server"/>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
yes it is possible to add the text from Code behind file
its something like
dropdownID, items.insert("0","Select an item")
example
<asp:dropdownlist id="EEddl" runat="server"> </asp:dropdownlist>
then
EEddl.items.insert ("0", "Please select from...")
this would definitely help you
thanks
its something like
dropdownID, items.insert("0","Select an item")
example
<asp:dropdownlist id="EEddl" runat="server"> </asp:dropdownlist>
then
EEddl.items.insert ("0", "Please select from...")
this would definitely help you
thanks
you could just wait for a minute...!!! i also written a perfect solution
Nevertheless, its ok, nothing can be done...
Nevertheless, its ok, nothing can be done...
ASKER
Thank you.