help needed with passing parameters
-
Hi, i need help in passing parameters from a datalist to another page. this is how my app works: i have a database ( access) a table with the following columns: id,title,desc,photo. another table with the following columns: (startsin, endsin,price,tId) on the first page (tourpack.aspx) i have a datalist, when user clicks on a button that is in the templateitem of the datalist, he will be transfered to another page called (showtour.aspx). what im trying to do is passing the ID parameter from the first page (table 1) to the second page (showtour.aspx) with the id number so he can see the specific details of that "tour" that are located In the second table. any idea how it works? i would appreciate any kind of help. Thanks, Farraj.
-
Hi, i need help in passing parameters from a datalist to another page. this is how my app works: i have a database ( access) a table with the following columns: id,title,desc,photo. another table with the following columns: (startsin, endsin,price,tId) on the first page (tourpack.aspx) i have a datalist, when user clicks on a button that is in the templateitem of the datalist, he will be transfered to another page called (showtour.aspx). what im trying to do is passing the ID parameter from the first page (table 1) to the second page (showtour.aspx) with the id number so he can see the specific details of that "tour" that are located In the second table. any idea how it works? i would appreciate any kind of help. Thanks, Farraj.
Farraj wrote:
passing the ID parameter from the first page (table 1) to the second page (showtour.aspx)
you need to have the a column(ID) same in both the tables. Join both the tables. pass the ID through query string to showtour.aspx //on page load of show tour using the id from query string get the tour details
-
Farraj wrote:
passing the ID parameter from the first page (table 1) to the second page (showtour.aspx)
you need to have the a column(ID) same in both the tables. Join both the tables. pass the ID through query string to showtour.aspx //on page load of show tour using the id from query string get the tour details
-
Hi, i need help in passing parameters from a datalist to another page. this is how my app works: i have a database ( access) a table with the following columns: id,title,desc,photo. another table with the following columns: (startsin, endsin,price,tId) on the first page (tourpack.aspx) i have a datalist, when user clicks on a button that is in the templateitem of the datalist, he will be transfered to another page called (showtour.aspx). what im trying to do is passing the ID parameter from the first page (table 1) to the second page (showtour.aspx) with the id number so he can see the specific details of that "tour" that are located In the second table. any idea how it works? i would appreciate any kind of help. Thanks, Farraj.
On the buttonclick where you are transferring the user to another page.Pass the id in querystring as
showtour.aspx?tourid=1
. Now read this id at pageload on showtour.aspx asRequest.QueryString["tourid"]
and load the details for this ID.Cheers!! Brij Check my latest Article :URL Routing with ASP.NET 4.0
-
On the buttonclick where you are transferring the user to another page.Pass the id in querystring as
showtour.aspx?tourid=1
. Now read this id at pageload on showtour.aspx asRequest.QueryString["tourid"]
and load the details for this ID.Cheers!! Brij Check my latest Article :URL Routing with ASP.NET 4.0
-
thanks. sorry for the lack of knowledge in this issue. how can i load the details for this ID in the detailsview control i have on the second page showtour.aspx?
See, you need to read the ID from querystring, not get the details of the tour from DB fro this ID and show the detail using You detailsveiw control. If you have problem is using detailsview control,the look at the following links Link 1 Link 2
Cheers!! Brij Check my latest Article :URL Routing with ASP.NET 4.0