Passing variables in query string in the HyperLinkColumn of a datagrid

A

aparnasinha26

Hi All,
I have to pass variable in a query string.
The query string is in the hyperlink coloumn of a datgrid.

The code appears like this
<asp:HyperLinkColumn DataNavigateUrlField="ProductID"
DataNavigateUrlFormatString="ViewProduct.aspx?qProductID='<%strProduct%>'"
DataTextField="ProductID" HeaderText="Product ID">
<HeaderStyle Width="10%"></HeaderStyle>
</asp:HyperLinkColumn>


this does not work..
Can any one help..
 
T

TDAVISJR

Where is <%strProduct%>' coming from. Is this a column in your datasource.
If so then you need to sue the binding synthax '<%# strProduct%>'
 
A

aparnasinha26

Hi,
Thanks..
To continue with ur question..
No '<%­strProduct%>' is a variable which stores the value from a query
string.
The page is accepting a query string which is stored in query string
'qProduct'
I assign qProduct to the public variable strProduct on form load in my
code behind file of asp.net.
the code behind is VB ie I am working on VB.Net.

I hope this clears your question
 

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
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top