ASP.NET

 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me



Go Back   Tutorialized ForumsWeb Design & DevelopmentASP.NET

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Tutorialized Forums Sponsor:
  #1  
Old April 12th, 2013, 11:51 PM
baijuep baijuep is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Dec 2012
Posts: 4 baijuep User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 26 m 47 sec
Reputation Power: 0
GRIDVIEW HYPERLINK QueryString

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.

Reply With Quote
  #2  
Old April 26th, 2013, 03:42 AM
samuelblack samuelblack is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Apr 2013
Posts: 7 samuelblack User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 54 m 53 sec
Reputation Power: 0
GRIDVIEW HYPERLINK QueryString

data set which you using is getting no data probably
or the query string that used doesnot hold apporpriate PNo

Reply With Quote
  #3  
Old May 3rd, 2013, 08:58 AM
annaharris annaharris is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Apr 2013
Posts: 22 annaharris User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 23 m 59 sec
Reputation Power: 0
I agree with samuelblack as the dataset filled by the query is fetching no value.

Reply With Quote
Reply

Viewing: Tutorialized ForumsWeb Design & DevelopmentASP.NET > GRIDVIEW HYPERLINK QueryString


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.

© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap