problems with DropDownList

Discussion in 'C#' started by bertanha, Jan 24, 2010.

  1. #1
    Hi guys


    I am new in asp.net, I having a problem with select values in DropDownList in button event,

    basically I have a Client form, one button will check of the Login user, case have the registry in data base it's go to load all client informations in the form, in this form I have one DropDownList which contain one coletion of brazilian states, in the event button it's go to stay selected in the correct field,


    someone tell me how to select one field in button event onclick or load page event ?

    (obs: Sorry my bad english I from Brazil)
     
    bertanha, Jan 24, 2010 IP
  2. vihutuo

    vihutuo Well-Known Member

    Messages:
    1,511
    Likes Received:
    34
    Best Answers:
    0
    Trophy Points:
    180
    #2
    I guess you can use
    DropDownList1.SelectedValue = "your value"
     
    vihutuo, Jan 25, 2010 IP
  3. bertanha

    bertanha Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thank s vihutuo !!!!!

    It' s work now !!!!!!!!!!
    thank s for all!!
     
    bertanha, Jan 25, 2010 IP