Passing DataField to a new page

K

karamyog.singh

Hi,
I am new to asp.net. I am trying to pass a value(categoryname) from a
gridview on Home.aspx and am trying to display more information about
the categoryname on another page Home1.aspx

On the home.aspx page i have a grid with the following field:-

<asp:HyperLinkField headertext = "categoryname"
Datatextfield="categoryname" DataNavigateUrlFormatString = "~/
Home1.aspx?id={0}" DataNavigateUrlFields = "categoryname" Text="View" /
How do I display the information for the category name that i am
sending?

My query string on the Home1.aspx page is as follows:-

select distinct rad.[categoryname], rad.[price] from Report.category
rad where (rad.[categoryname]=?id={0})

I get the following error:-

Incorrect syntax near '?'

Can some1 please help...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top