object data source and gridview

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ahmedhussain
    New Member
    • Dec 2008
    • 79

    object data source and gridview

    hey every one....
    This is very urgent....

    I made a footer under a gridview.
    In that footer I have introduced 3 textboxes..I want to insert the value through these 3 text boxes into my database.

    What I did is I made a button in front of it...And now Im trying to get the value which is under the footer text boxes that is impossible for me to do it.

    And Also I want it to store those value in my database.
    Please help me out..

    Thank you

    Regards
    Ahmed
  • Ahmedhussain
    New Member
    • Dec 2008
    • 79

    #2
    HelloOoO.....

    This was supposed to be urgent.....

    Still if someone can answer ...Please do

    thank you

    Comment

    • Bassem
      Contributor
      • Dec 2008
      • 344

      #3
      Hello Ahmed,
      Until you get a better solution, and you'll

      I suppose you use SQL database, and c#.

      what you need is to bind the values of the 3 TextBoxes to SQL database, you're using dataGrideVeiw so,
      1) Drag and drop on you page a sqlDataSource
      2) Configure data source -> create your connect -> type your queries.
      3) sqlDataSource -> Properties -> insertCommand
      for example
      " INSERT INTO EMPLOYEE (FNAME, LNAME, AGE) VALUES (@fName, @Lname, @age)"
      then refresh parameters
      for each parameter choose your parameter source (control for TextBox)
      ->OK then try

      Regards
      Bassem

      Comment

      • Ahmedhussain
        New Member
        • Dec 2008
        • 79

        #4
        Hi,

        Hi Bassem,

        Thank you very much :)

        It does help me...But Im already using my datasource to get the value from sql database...

        Thank you

        Regards,

        Ahmed

        Comment

        Working...