Passing values in DataGrid
I was trying to pass two values. My previous login page I passed ID to Patient.aspx and queried an Access DB. On this page I use user=Request.QueryString("ID") in the Page_Load sub to get the valued passed.
To direct to record.aspx I need to pass user and PatientID inorder to get the correct info from the DB.
<asp:HyperLinkColumn
Text="ok"
DataNavigateUrlField="Patient"
DataNavigateUrlFormatString="Record.aspx?UserID="& <%user%>&"&PatientID={0}"
/>
This doesn't work but when I hard code UserID with 1 then it works.
<asp:HyperLinkColumn
Text="ok"
DataNavigateUrlField="Patient"
DataNavigateUrlFormatString="Record.aspx?UserID=1& PatientID={0}"
/>
How can I pass user to DataNavigateUrlFormatString?
If there is a better way I'm open for suggestions.
Thank You
|