Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

unable to get the data from the gridview

Status
Not open for further replies.

venuchalla

Programmer
May 30, 2006
29
FR
Hello,
I am having a gridview which has records from more than one tables.
id,description and tablename are the columns.

I also have a hyperlinkfield as one of the columns.
on click of this hyperlinkfield I need to show the complete record with that purticular id in that purticular tablename.

I have written the querystring like this
-------------------------------------------
NavigateUrl="SearchDetails.aspx?id=idvalue&tablename=tablenamevalue"
-------------------------------------------

on the searchdetails.aspx page i have written
-------------------------------------------
string str=Request.QueryString["id"];
string str1 = Request.QueryString["tablename"];

string searchDetails="Select * from tablename =" +str1 +" where Id="+str;
-------------------------------------------
I am not able to get the id , or the tablename to the nextpage.

Can anyone of you please say where I am doing wrong, how to get the values to be passed to the searchdetailspage.

Thanks in advance


 
Run the first page with the grid. Then right click the browser and "View Source". Check that the navigate url for each hyperlink is constructed correctly.
 
Also, please refrain from posting the same question multiple times:

thread855-1247283
thread855-1245556
 
This is what is there in the view source.

I am not getting the values in the idvalue and tablenamevalue.

<tr style="background-color:Tan;font-weight:bold;">
<th scope="col">&nbsp;</th><th scope="col">ID</th><th scope="col">Description</th><th scope="col">TableName</th>
</tr><tr>
<td><a href="SearchDetails.aspx?id=idvalue&amp;tablename=Tablenamevalue">1</a></td><td>1</td><td>Maintenance</td><td>TSGUpdate</td>
</tr><tr style="background-color:paleGoldenrod;">
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top