|
-
Dec 9th, 2010, 06:24 PM
#1
Thread Starter
Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|