snow
06-29-2006, 03:52 PM
Hello,
I was wondering about the possibility of using the value of my DropDownList and not the text as the value that interacts with the datasource.
Athe moment I have something like:
<asp:formview id='formview1' runat='server' DataSourceID='SqlDataSource1' DefaultMode='Insert'>
<asp:dropdownlist id='developerList' runat='server' dataSourceId='SqlDevelopers' dataTextField='name' dataValueField='developerId' text='<%# Bind("developer") %>' >
</asp:dropdownlist>
</asp:formview>
So basically, I want the user to see the developer's name in the box, but behind, for everything to be using the developerID contained in value.
What I'd ideally like is a "value" attribute instead of the "text" attribute - but is there any sensible way to make this work?
Thanks very much,
Sarah Williamson
I was wondering about the possibility of using the value of my DropDownList and not the text as the value that interacts with the datasource.
Athe moment I have something like:
<asp:formview id='formview1' runat='server' DataSourceID='SqlDataSource1' DefaultMode='Insert'>
<asp:dropdownlist id='developerList' runat='server' dataSourceId='SqlDevelopers' dataTextField='name' dataValueField='developerId' text='<%# Bind("developer") %>' >
</asp:dropdownlist>
</asp:formview>
So basically, I want the user to see the developer's name in the box, but behind, for everything to be using the developerID contained in value.
What I'd ideally like is a "value" attribute instead of the "text" attribute - but is there any sensible way to make this work?
Thanks very much,
Sarah Williamson