Find Control("txtaddress"), Text Box) Dim city As Text Box = Direct Cast(grid View. aspdotnet-suresh offers C#articles and tutorials,csharp dot net,articles and tutorials, VB.If you have more than one primary key, you can separate the values with a comma. In this article we create a Gridview from database and add some additional operations such a add, edit and delete data in the Grid View control.
Page Private con As New Sql Connection("Data Source=.; Initial Catalog=pubs; User ID=sa; Password=*****") Protected Sub Page_Load(By Val sender As Object, By Val e As System. Load If Not Is Post Back Then load Stores() End If End Sub Protected Sub load Stores() con. Run the project and place a breakpoint on the code above. The program will stop on the breakpoint and you will be able to see the selected row index being passed through.You can then use the code below to retrieve the ID value: are a great way to use primary keys without having to display them to the user. To String() Dim stor_name As Text Box = Direct Cast(grid View. Find Control("txtname"), Text Box) Dim stor_address As Text Box = Direct Cast(grid View.