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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. how to retrive the correspoding data in the textbox

how to retrive the correspoding data in the textbox

Scheduled Pinned Locked Moved ASP.NET
csharptutorial
2 Posts 2 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.
  • B Offline
    B Offline
    biswa47
    wrote on last edited by
    #1

    i have a table emp.where the coloumns are emp_id,emp name and address. and onother table named as emp_details where the coloumns are. empid,emp_sex,emp_age,emp_bloodgroup. now i am populating the data of emp in the gridview1 where "auto generate select button is true". whenever i will select the record of any employee.the corresponding empid of that column should display in the "textbox2" show that i can enter the other data for emp_details(where the other text boxes are there to enter age,sex and blood_ group). canyou tellme what code i wil write for it(in vb.net)

    B 1 Reply Last reply
    0
    • B biswa47

      i have a table emp.where the coloumns are emp_id,emp name and address. and onother table named as emp_details where the coloumns are. empid,emp_sex,emp_age,emp_bloodgroup. now i am populating the data of emp in the gridview1 where "auto generate select button is true". whenever i will select the record of any employee.the corresponding empid of that column should display in the "textbox2" show that i can enter the other data for emp_details(where the other text boxes are there to enter age,sex and blood_ group). canyou tellme what code i wil write for it(in vb.net)

      B Offline
      B Offline
      Bhaskar Shetty
      wrote on last edited by
      #2

      Loop through the all the Items in datagrid and Set the onclick attribute to the link button of grid, and then call any procedure through Javascript, which assigns the value to textbox. Code for settting onclick attribute to datagrid. Dim LnkBtn As New System.Web.UI.WebControls.LinkButton LnkBtn = datagrid1.Items(i).Cells(0).FindControl("lnkSelect") LnkBtn.Attributes.Add("onclick", "Write the Javascript Code Or Call local Javascript Procedure") Script for Setting value to TextBox. document.all('textbox1').value = datagrid1.Item(RowId).cells(ColID).text>

      Bhaskar Shetty

      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