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
  1. Home
  2. General Programming
  3. C#
  4. C#.Net ASP (Urgent)

C#.Net ASP (Urgent)

Scheduled Pinned Locked Moved C#
csharpasp-netcomhelptutorial
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Muhammad Waqas Butt
    wrote on last edited by
    #1

    Hi, I have a question. I have a comobox, i've bind data something like this oleDbDataAdapter1.Fill(dataSet11); DropDownList1.DataSource = dataSet11.Tables[0].DefaultView; DropDownList1.DataTextField = dataSet11.tbacdes.ac_headColumn.ToString(); //Display AC Head DropDownList1.DataValueField = dataSet11.tbacdes.ac_idColumn.ToString(); // Display AC Id DropDownList1.DataBind(); first of all is correct. Now I want to to show Account Header in comobox and when user select any value than selectindex pass header id this my question, please help me out init. Example ======= [Student Fee] Display value and in backend of this entry in comobox header id is 2 I'm using asp.net 1.1, C#.Net.

    |Muhamad Waqas Butt| waqasb4all@yahoo.com www.sktech.freewebspace.com

    M C 2 Replies Last reply
    0
    • M Muhammad Waqas Butt

      Hi, I have a question. I have a comobox, i've bind data something like this oleDbDataAdapter1.Fill(dataSet11); DropDownList1.DataSource = dataSet11.Tables[0].DefaultView; DropDownList1.DataTextField = dataSet11.tbacdes.ac_headColumn.ToString(); //Display AC Head DropDownList1.DataValueField = dataSet11.tbacdes.ac_idColumn.ToString(); // Display AC Id DropDownList1.DataBind(); first of all is correct. Now I want to to show Account Header in comobox and when user select any value than selectindex pass header id this my question, please help me out init. Example ======= [Student Fee] Display value and in backend of this entry in comobox header id is 2 I'm using asp.net 1.1, C#.Net.

      |Muhamad Waqas Butt| waqasb4all@yahoo.com www.sktech.freewebspace.com

      M Offline
      M Offline
      Muammar
      wrote on last edited by
      #2

      Did you just mentioned (Urgent) in your post and (Butt) in your name:~ Ouch!!


      Smile: A curve that can set a lot of things straight! (\ /) (O.o) (><)

      1 Reply Last reply
      0
      • M Muhammad Waqas Butt

        Hi, I have a question. I have a comobox, i've bind data something like this oleDbDataAdapter1.Fill(dataSet11); DropDownList1.DataSource = dataSet11.Tables[0].DefaultView; DropDownList1.DataTextField = dataSet11.tbacdes.ac_headColumn.ToString(); //Display AC Head DropDownList1.DataValueField = dataSet11.tbacdes.ac_idColumn.ToString(); // Display AC Id DropDownList1.DataBind(); first of all is correct. Now I want to to show Account Header in comobox and when user select any value than selectindex pass header id this my question, please help me out init. Example ======= [Student Fee] Display value and in backend of this entry in comobox header id is 2 I'm using asp.net 1.1, C#.Net.

        |Muhamad Waqas Butt| waqasb4all@yahoo.com www.sktech.freewebspace.com

        C Offline
        C Offline
        Christian Graus
        wrote on last edited by
        #3

        | Muhammad Waqas Butt | wrote:

        C#.Net ASP (Urgent)

        OK, that really doesn't tell us much, except that you couldn't find the ASP.NET forum, and you're impatient.

        | Muhammad Waqas Butt | wrote:

        DropDownList1.DataBind();

        1 - please give your variables real names. I am astounded how many people post code here and have not set meaningful variable names 2 - do this only on the first call ( check for !IsPostback ), otherwise, your selected index will be lost on postback 3 - handle the SelectedIndexChanged event, then the form will postback when you change the selection ( or add a button so users have to select to do this ) and then in there, check the SelectedValue property, use int.TryParse to get it as a number, if it's a number, and do whatever database calls, etc you want with it from there.

        Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

        P 1 Reply Last reply
        0
        • C Christian Graus

          | Muhammad Waqas Butt | wrote:

          C#.Net ASP (Urgent)

          OK, that really doesn't tell us much, except that you couldn't find the ASP.NET forum, and you're impatient.

          | Muhammad Waqas Butt | wrote:

          DropDownList1.DataBind();

          1 - please give your variables real names. I am astounded how many people post code here and have not set meaningful variable names 2 - do this only on the first call ( check for !IsPostback ), otherwise, your selected index will be lost on postback 3 - handle the SelectedIndexChanged event, then the form will postback when you change the selection ( or add a button so users have to select to do this ) and then in there, check the SelectedValue property, use int.TryParse to get it as a number, if it's a number, and do whatever database calls, etc you want with it from there.

          Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

          P Offline
          P Offline
          Paul Conrad
          wrote on last edited by
          #4

          Christian Graus wrote:

          | Muhammad Waqas Butt | wrote: DropDownList1.DataBind(); 1 - please give your variables real names. I am astounded how many people post code here and have not set meaningful variable names

          Yes, this is one of my peeves. People that do this can have loads of fun debugging when they have multiple forms with more than one DropDownList1 in their project if they do so.

          "Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

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