IN MY ASP.NET+VB+ACCESS DATABASE WEB.
in a gridview there is a hyperlink field the code i used is as under
<asp:HyperLinkField
DataTextField="PNO"
HeaderText="PNO"
SortExpression="PNO"
DataNavigateUrlFields="PNO"
DataNavigateUrlFormatString="pers.aspx?PNO={0}" />
when i click in the link it directs to a page pers.aspx
in that (pers.apsx) page
there are textboxes and a gridview
in the griedview datasource i had given following code
SelectParameters>
<asp:QueryStringParameter DefaultValue="0" Name="PNO" QueryStringField="pno"
Type="String" />
</SelectParameters>
the data of that particular persons is displayed in fgridview correctly but the text box data is not diplayed.
the code used in pers.aspx.vb is as under
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim PNO As String = Request.QueryString("PNO")
Dim connectString As String = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\web\Wing.mdb"
Dim con As OleDbConnection = New OleDbConnection(connectString)
con.Open()
PNO = "select * from Pers WHERE ([PNO] = ?)"
Dim OleDb As New OleDbDataAdapter(PNO, con)
Dim dt As New DataSet
dt.Clear()
OleDb.Fill(dt, "PersData")
pnotxt.Text = dt.Tables("Pers").Rows(0).Item("PNO")
ranktxt.Text = dt.Tables("Pers").Rows(0).Item("SKILL")
nametxt.Text = dt.Tables("Pers").Rows(0).Item("Name")
dtsentxt.Text = dt.Tables("Pers").Rows(0).Item("DOB")
unittxt.Text = dt.Tables("PERS").Rows(0).Item("DEPOT") "
tostxt.Text = dt.Tables("PERS").Rows(0).Item("FROM")
remarktxt.Text = dt.Tables("PERS").Rows(0).Item("Remarks")
coursetxt.Text = dt.Tables("PERS").Rows(0).Item("Course")
End Sub
WHEN THE CODE FOR THE TEXT BOXES ARE ADDED THE FOLLOWING ERROR COMES
No value given for one or more required parameters.
Baiju EP