wheninrome
New Member
I had all of my code in the .aspx file. Since I had alot of code I decided to move it to the .aspx.vb file. <BR><BR>In my aspx file I have a form with a textbox and a button as follows: <BR><BR><form action="default.aspx" name="form" method="post" runat="server"> <BR><asp:Label id="Label1" runat="server" Width="135px">Account Number:</asp:Label> <BR><asp:TextBox id="TextBox1" runat="server" Width="177px"></asp:TextBox> <BR><asp:Button id="Button1" onclick="Submit1_ServerClick" runat="server" Text="Submit"></asp:Button> <BR><BR>When I click the button after typing in the account number I get nothing back, not even an error. <BR><BR>here is the 'Submit1_ServerClick' code: <BR><BR>Public Sub Submit1_ServerClick(ByVal sender As System.Object, ByVal e As System.EventArgs) <BR>Dim MyConnection As SqlConnection <BR>MyConnection = New SqlConnection("server=*user id=*;password=*;database=*") <BR><BR>Dim DS As DataSet <BR>Dim MyCommand As SqlDataAdapter <BR>Dim myList As DataGrid <BR><BR>MyCommand = New SqlDataAdapter("select* from * ", MyConnection) <BR>DS = New DataSet() <BR>myList = New DataGrid() <BR>MyCommand.Fill(DS, "table") <BR>myList.DataSource = DS.Tables("table").DefaultView <BR>myList.DataBind() <BR>End Sub <BR><BR>please help me