Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 Forwarding data to a new aspx page

Author  Topic 

Noureldin
Starting Member

14 Posts

Posted - 2005-08-03 : 09:05:14
Hello

I already have an aspx page where, lets say has a dataGrid with a list of movies (movie names as links), when the user clicks on a particular movie, I get the value of the pressed item from the dataGrid, but what I want is when the user clicks, a new page opens, lets say done.aspx using: Response.Redirect("done.aspx") and I want to pass to this page the value I retreived when the user clicked, so I view some stuff in the new page depending on the value pressed

elwoos
Master Smack Fu Yak Hacker

2052 Posts

Posted - 2005-08-03 : 09:12:36
You have a few options here but superficially I would suggest you use a query string

e.g. http://www.sqlteam.com/forums/topic.aspx?TOPIC_ID=53223

i.e. the parameter TOPIC_ID is passed with the value 53223 to the page topic.aspx

steve

Alright Brain, you don't like me, and I don't like you. But lets just do this, and I can get back to killing you with beer.
Go to Top of Page

Noureldin
Starting Member

14 Posts

Posted - 2005-08-03 : 10:08:50
Ok, fine. But when creating the topic.aspx page, how do I make it expect a parameter?

Because in my case, when I come to compile the aspx page, it doesn't recognize the parameter that was passed. Seems I need to define it somewhere
Go to Top of Page

elwoos
Master Smack Fu Yak Hacker

2052 Posts

Posted - 2005-08-03 : 11:52:42
In the example above you would use

request.querystring("TOPIC_ID") to get the parameter value if you're using VB.NET - if you're using c# you would do the same but with square brackets). Don't forget to allow for postback too


steve

Alright Brain, you don't like me, and I don't like you. But lets just do this, and I can get back to killing you with beer.
Go to Top of Page
   

- Advertisement -