|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
return parameterI want to know the following. I am using ASP.NET and I am (dynamically) generating a list of hyperlinks from a database. When the user clicks one of these links it should load an aspx page, but all the links should load the same aspx page since it will be similar for all of them. What I now need to know is which link was clicked? I know it is possible to do something like this http://www.somewhere.com/info/moreInfo.aspx?no23 In other words I want to append a number to each link and then when moreInfo.aspx is requested I want to read the no23 item from the database and regenerate the page with some new image and sumary of that item etc. How do I acomplish this in VB.NET? I'm sure its simple to do, I just don't know what this technique is called. Thanks Pieter
Show quote
Hide quote
"Pieter" <pauc***@webmail.co.za> wrote in message You want to create a hyperlink that sets a value in the QueryString?news:dbgau4$c37$1@ctb-nnrp2.saix.net... > Hi > > I want to know the following. I am using ASP.NET and I am (dynamically) > generating a list of hyperlinks from a database. When the user clicks one > of these links it should load an aspx page, but all the links should load > the same aspx page since it will be similar for all of them. What I now > need to know is which link was clicked? > > I know it is possible to do something like this > http://www.somewhere.com/info/moreInfo.aspx?no23 > In other words I want to append a number to each link and then when > moreInfo.aspx is requested I want to read the no23 item from the database > and regenerate the page with some new image and sumary of that item etc. > > How do I acomplish this in VB.NET? > I'm sure its simple to do, I just don't know what this technique is > called. > > Thanks > Pieter > > Dim lnk As HyperLink .... lnk.NavigateUrl = "http://www.somewhere.com/info/moreInfo.aspx?no=23" In your moreInfo.aspx page, Page_Load (or somewhere else that occurs after Page_Load event fires), query the value of "no" by using Request.QueryString...which I believe is a NameValueCollectionBase derived object. HTH, Mythran
Cannot change font in Webcontrol treeview node
Timer.Elapsed event doesn't want to fire Working with Mac Safari Browser How do I find out the page name in ASP composite control does not fire event Datagrid navigation problem asp.net: Composite Control with GridView Using OpenFileDialog Using OpenFileDialog How do I get a custom Control Designer to write to the HTML of my control? |
|||||||||||||||||||||||