Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
A

anil pathak

@anil pathak
About
Posts
1
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Dropdown
    A anil pathak

    Hi Friend, put you code inside on IsPostBack ==false like below code and put the DataTextField and DataValueField properly like this. this code should be in Page_Load events. if (!IsPostBack) { SqlConnection con = new SqlConnection("your connection string here"); SqlDataAdapter da = new SqlDataAdapter("Select StateId,StateName From StateMaster", con); con.Open(); DataSet ds = new DataSet(); da.Fill(ds); DropDownList1.DataSource = ds; DropDownList1.DataTextField = "StateName"; // your dispaly field in dropdownlist DropDownList1.DataValueField = "StateId"; // your value field which you will stare in database DropDownList1.DataBind(); con.Close(); }

    Anil Pathak worked on technologies like C#, VB.net, ASP.net, Web Service, WCF, WPF, Silver Light, MVC 3.0, Jquery, Sql Server.

    ASP.NET help
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups