0% found this document useful (0 votes)
61 views2 pages

ASP.NET Student Data Display

This document contains code for an ASP.NET page that displays student data from a database. It uses a FormView control bound to a DataSet to display the student ID and name fields in a table. On a button click, it queries the database for a student by ID, binds the results to three different data controls - a DetailsView, DataList and the FormView - to display the student details.

Uploaded by

Ajmal Rahman
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
61 views2 pages

ASP.NET Student Data Display

This document contains code for an ASP.NET page that displays student data from a database. It uses a FormView control bound to a DataSet to display the student ID and name fields in a table. On a button click, it queries the database for a student by ID, binds the results to three different data controls - a DetailsView, DataList and the FormView - to display the student details.

Uploaded by

Ajmal Rahman
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd

<asp:FormView ID="FormView2" runat="server">

<ItemTemplate>
<table border=1>
<tr><td><b>ID : </b></td>
<td>'<%# [Link]([Link], "Id") %>'
</td></tr>
<tr><td><b>Name : </b></td>
<td>'<%# [Link]([Link], "Name") %>'

</table>
</ItemTemplate>

</asp:FormView>

using System;
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];

public partial class Datalist : [Link]


{
Class1 obj = new Class1();
protected void Page_Load(object sender, EventArgs e)
{

}
protected void btnDisp_Click1(object sender, EventArgs e)
{
string str = "select * from Tab_StudentsReg where
Id='"+[Link]+"'";
DataSet ds = new DataSet();
ds = [Link](str);

[Link] = ds;
[Link]();
[Link] = ds;
[Link]();
[Link] = ds;
[Link]();
}

You might also like