Hi Sean,
You can put the value in as an attribute like this:
<ASP:DropDownList id="lstRegion" name="lstRegion" maxlength="40"
runat="server">
<asp:ListItem Value="NSW">New South Wales</asp:ListItem>
<asp:ListItem Value="V">Victoria</asp:ListItem>
<asp:ListItem Value="T">Tasmania</asp:ListItem>
<asp:ListItem Value="SA">South Australia</asp:ListItem>
<asp:ListItem Value="WA">Western Australia</asp:ListItem>
<asp:ListItem Value="NT">Northern Territory</asp:ListItem>
<asp:ListItem Value="Q">Queensland</asp:ListItem>
</ASP:DropDownList>
Does this help?
Ken
Microsoft MVP [ASP.NET]
Toronto
"Sean" <se**********@shopsmart.com.au> wrote in message
news:ud**************@TK2MSFTNGP12.phx.gbl...
HI There,
I would like to find out the syntax for having option values different
from
the ones displayed on the page? In regular HTML the forms are like
<option value=1>New South Wales</option>, how can I acheive this in asp
.net?
Sean
!---
<ASP:DropDownList id=lstRegion name=lstRegion maxlength= "40"
runat=server>
<asp:ListItem>New South Wales</asp:ListItem>
<asp:ListItem>Victoria</asp:ListItem>
<asp:ListItem>Tasmania</asp:ListItem>
<asp:ListItem>South Australia</asp:ListItem>
<asp:ListItem>Western Australia</asp:ListItem>
<asp:ListItem>Northern Territory</asp:ListItem>
<asp:ListItem>Queensland</asp:ListItem>
</ASP:DropDownList>