Asp.net+vb +showing record into text box

asp.net, access database, vb

well i want to show record into text box in vb used to have text1.text=rs!tablename

n asp.net+vb wht we use code are as follows
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    Dim dbconn, sql, dbcomm, dbread
    dbconn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;data source=" & Server.MapPath("ambreenmisbahdb.mdb"))
    dbconn.Open()
    sql = "SELECT * FROM user_login"
    dbcomm = New OleDbCommand(sql, dbconn)
    dbread = dbcomm.ExecuteReader()
    Repeater1.DataSource = dbread
    Repeater1.DataBind()

    dbread.Close()
    dbconn.Close()
End Sub

other is
<%@ Page Language=“VB” AutoEventWireup=“false” CodeFile=“Edit_NewUser.aspx.vb” Inherits=“Edit_NewUser” %>
<%@ Import Namespace=“System.Data.OleDb” %>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>

<html xmlns=“http://www.w3.org/1999/xhtml” >
<head runat=“server”>
<title>Untitled Page</title>
</head>
<body>
<form id=“form1” runat=“server”>
<div>
<asp:Repeater ID=“Repeater1” runat=“server”>
</asp:Repeater>
 </div>
<br />
<table>
<tr>
<td style=“width: 121px; height: 26px”>
<span style=“font-size: 16pt”><strong>New</strong> <strong>User</strong></span></td>
<td style=“width: 157px; height: 26px”>
<span style=“font-size: 16pt”><strong>             
         <span style=“color: #006633”>New</span></strong></span></td>
</tr>
<tr>
<td style=“width: 121px; height: 35px”>
</td>
<td style=“width: 157px; height: 35px”>
</td>
</tr>
<tr>
<td style=“width: 121px”>
<strong>First Name</strong></td>
<td style=“width: 157px”>
<asp:TextBox ID=“txtfname” runat=“server” Width=“148px” text=‘<%# eval(“f_Name”) %>’ >
</asp:TextBox></td>
</tr>
<tr>
<td style=“width: 121px”>
<strong>Last Name</strong></td>
<td style=“width: 157px”>
<asp:TextBox ID=“txtlname” runat=“server”></asp:TextBox></td>
</tr>
<tr>
<td style=“width: 121px; height: 21px”>
<strong>Email</strong></td>
<td style=“width: 157px; height: 21px”>
<asp:TextBox ID=“txtemail” runat=“server”></asp:TextBox></td>
</tr>
<tr>
<td style=“width: 121px”>
<strong>User Name</strong></td>
<td style=“width: 157px”>
<asp:TextBox ID=“txtusername” runat=“server”></asp:TextBox></td>
</tr>
<tr>
<td style=“width: 121px”>
<strong>Password</strong></td>
<td style=“width: 157px”>
<asp:TextBox ID=“txtpassword” runat=“server”></asp:TextBox></td>
</tr>
<tr>
<td style=“width: 121px”>
</td>
<td style=“width: 157px”>
</td>
</tr>
<tr>
<td style=“width: 121px”>
</td>
<td style=“width: 157px”>
<asp:Button ID=“Button1” runat=“server” Text=“Button” /></td>
</tr>
<tr>
<td border=“0” style=“width: 121px”>
</td>
<td border=“0” style=“width: 157px”>
</td>
</tr>
</table>
</form>
</body>
</html>
i m consued which is use for code vb one or html

Your question might need a bit more clarity cos i really don’t understand it

well i m asp.net+vb+access
i want to show record into textbox

Ok, then I guess you need to read the data from the database and the set the text value of the textboxt to the required data field.

i need code

Well, you need to have something work with, then someone can try and help. One just can’t generate code for you because code depends on what you’re dealing with. So if you start up something and have a problem with it, then help can come

I don’t use webforms, but I’ll take a shot at helping you.

First, I see where you’ve fetched your data, and populated the repeater:

dbconn.Open()
sql = “SELECT * FROM user_login”
dbcomm = New OleDbCommand(sql, dbconn)
dbread = dbcomm.ExecuteReader()
Repeater1.DataSource = dbread
Repeater1.DataBind()
dbread.Close()
dbconn.Close()

Second, I see where you defined the repeater:

<asp:Repeater ID=“Repeater1” runat=“server”>
</asp:Repeater>

Third, I noticed that elements that you want to fill are not within the repeater tag, so the repeater doesn’t know what to repeat.

Fourth, I would imagine that the repeater and/or contained asp tags must have a property set to tell the repeater what field in the result set to bind to. You should be able to look this up easily yourself by googling ‘asp.net repeater control example’.

Yes, as Serena said. You have a DataReader and have bound it to the repeater.

You are missing the <ItemTemplate> tag in the repeater. If you have a textbox in there, the will be a textbox for each item in the database.

PS. Where possible you should never use select * from table. Always select the columns as needed, as the * will prevent your query using indexes which could affect performance

Also look into using the <%# Eval(“fieldName”) %> structure if you don’t plan on using a datagrid.