Groups | Blog | Home
all groups > asp.net datagrid control > december 2005 >

asp.net datagrid control : Retrieving hyperlink query string values


martinharvey via DotNetMonster.com
12/25/2005 5:31:53 AM
This is probably a very simple question but i would appreciate some help

I want to retrieve the ProductID from the querystring


<asp:HyperLinkColumn Text="View Details"
DataNavigateUrlField="ProductID"
DataNavigateUrlFormatString="details.aspx?ProductID={0}"
/>

In Sub Page_Load(sender As Object, e AS EventArgs)
dg.DataSource = Catalog.SP_GetInfo()
dg.DataBind
End Sub

Can anyone tell me how to to do this

many thanks

martin

--
Message posted via DotNetMonster.com
Elton Wang
12/25/2005 10:36:58 AM
Hi Martin,

I'm not sure what exactly your question is? If you mean get a variable from
QueryString in request when postback, you can use



string ProductID = Request.QueryString.Get("ProductID");


HTH



[quoted text, click to view]

martinharvey via DotNetMonster.com
12/28/2005 7:31:46 AM
[quoted text, click to view]

thank you for your help
martin

--
Message posted via DotNetMonster.com
AddThis Social Bookmark Button