Results 1 to 4 of 4

Thread: Place Data Into Textbox From ObjectDataSource

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2009
    Posts
    72

    Place Data Into Textbox From ObjectDataSource

    Hello,
    I have a web page where I am using an Object Datasource to pull data from my database. It will get one record. I want to be able to fill textboxes on my page with this pull.

    odsMailouts.Select()

    What do I do to get the data from the "Select" into the fields?

    Thanks!!
    Eddi Rae

  2. #2
    Discovering Life Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    12,001

    Re: Place Data Into Textbox From ObjectDataSource

    Moved from Visual Basic .NET
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved


    MyGear:
    ★ CPU ★ Ryzen 5 5800X
    ★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
    ★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
    ★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
    ★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
    ★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
    ★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
    ★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
    ★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
    ★ Keyboard ★ TVS Electronics Gold Keyboard
    ★ Mouse ★ Logitech G502 Hero

  3. #3
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    6,597

    Re: Place Data Into Textbox From ObjectDataSource

    Haven't used an xxdatasouce for a while but you probably can use the %eval or %bind interaptors on markup or you can handle they databound or what function odatasource provides you on server side, to insert the data to the textboxes.
    Unless %bind works, i think(if i remember correctly) that you will have to handle the "e" parameter on the binding function to get the row and then cut down the cells.
    You can of course call the data as you would have called it in vbforms and bind the textboxes (when i say bind, i mean txt1.text= thevalue). This is if you are strict on using server side calls on the page, else you will go to webservices, the future of web calling.
    In general for just one row, instead of goinf to all that trouble, a call to reader.read can do the trick.
    ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
    πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·

  4. #4
    ASP.NET Moderator gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Place Data Into Textbox From ObjectDataSource

    Hello,

    Here is a complete description of what you need to do to achieve what you want:

    http://msdn.microsoft.com/en-us/library/aa581783.aspx

    Hope this helps!

    Gary

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width