Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can a textbox be bound to a database or stored procedure?

Status
Not open for further replies.

cmsbuffet

Programmer
Feb 3, 2009
173
CA
Can a textbox be bound to a database or stored procedure? I would like to connect a textbox to a database. More specifically, I would like to pick a value in the textbox and have selected all the rows in the database that have that value in the textbox. What hints can you give me? Thanks.


 
I can call Response in Page_Load or in OKButton_Click. But how do I do that?

Code:
Imports System.IO
Imports System.IO.File
Imports System.Data
Imports System.Data.SqlClient

Partial Class _Default
    Inherits System.Web.UI.Page

 Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

.............
    End Sub

    Private Sub RetrieveIdentity(ByVal connectionString As String)
    

...................

Response.Write("List All Rows:")

            Dim row As DataRow

            For Each row In categories.Rows
                Response.Write("{0}: {1}", row(0), row(1))

            Next
        End Using
end sub

Protected Sub OKButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles OKButton.Click
................

        
    End Sub
end class

 
I have only a few days to complete the project. It will take me weeks to adjust with dot4net new software. Could you help me with the code I already have?
 
Apparently, Page.Response.Write(" ") is what works instead of Console.Writeline. Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top