Cannot Convert string to class type

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #16
    Please post the code that you used to populate your DropDownList.

    Comment

    • Queen Soso
      New Member
      • Dec 2009
      • 13

      #17
      I can't access my code right now, but I have a button's method that have this:

      TEL_T_NUMBER obj = new TEL_T_NUMBER();
      obj.Number_ID = Convert. ToInt32(textbox 1.text);
      obj.number_type .myValue = dropdownlist1.s electedItem.val ue;
      gridview.databi nd();

      Comment

      • Frinavale
        Recognized Expert Expert
        • Oct 2006
        • 9749

        #18
        If you step through this using a debugger, does dropdownlist1.s electedItem.val ue have something in it?

        Comment

        • Queen Soso
          New Member
          • Dec 2009
          • 13

          #19
          mmm I can't do it now but if I did it and the dropdownlist value was null, how can I make it carry a value?

          Comment

          • Queen Soso
            New Member
            • Dec 2009
            • 13

            #20
            I debugged my dropdownlist and it carries values....:(

            Comment

            Working...