srini,
not sure what you mean....... if i check the source its there:
<select name="Textures" id="Textures">
<option value="gold.jpg">gold.jpg</option>
<option value="goldwave.jpg">goldwave.jpg</option>
<option value="rocks.jpg">rocks.jpg</option>
</select>
and in the Page_Load i call a function that generates that droplist.......
but it doesnt work...... always prints first value (gold.jpg) in droplist
when i click the button......
"srini" <sr***@discussions.microsoft.com> wrote in message
news:BA**********************************@microsof t.com...
Hi Edsvik,
Just check if you are rebinding the data on PostBack.
Sample code for ref
private void Page_Load(object sender, System.EventArgs e)
{
if (!Page.IsPostBack)
{
DropDownList1.Items.Add("1");
DropDownList1.Items.Add("2");
DropDownList1.Items.Add("3");
}
}
private void Button1_Click(object sender, System.EventArgs e)
{
if(Page.IsValid)
{
Response.Write(DropDownList1.SelectedItem.Value );
}
}
HTH
srini
"Lasse Edsvik" wrote:
Hello
I have a dropdown with 3 different values, and it prints out first value
no