dropdown list issue

Results 1 to 2 of 2

Thread: dropdown list issue

  1. #1
    Join Date
    Dec 1969

    Default dropdown list issue

    hi there... I have a dropdown list populated by a database on page1.aspx<BR><BR>and i wish to pass its value to another page (page2.aspx)<BR><BR>on page1.aspx i determine the value of the selected item<BR><BR>public string TempDropDown<BR> {<BR> <BR> get<BR> {<BR> return DropDownList.SelectedItem.Value;<BR> }<BR> }<BR><BR>I then post it to page2and try to print out the value of item i selected<BR>WebForm1 wf = new WebForm1();<BR> wf = (WebForm1)Context.Handler;<BR> Label1.Text = wf.TempDropDownList;<BR><BR>*****<BR>But forsome reason it always just prints out the same value and not the value i selected.<BR>(the above method work fine for text boxs but not my dropdown box? <BR><BR>can any one help?<BR> <BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: dropdown list issue

    You do not show how you are passing the value to Page 2. But make sure if you&#039;re doing a second page load on Page 1 that you load your drop down list inside a Page.IsPostBack like...<BR><BR>If Not Page.IsPostBack Then<BR> dropdownlist<BR>End If

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts