Reputation: 1022
I have a web site that includes two pages. one of them shows my basket (basket.aspx) and the other shows the product(product.aspx). I want to update grid view in basket page when the users click on each products when they buy them.
I test this solution but this code doesn't work for me.
ASP.codebehind_files_default2_aspx page = new ASP.codebehind_files_default2_aspx();
after ASP. a message VS just show the name of my page and global.asax.I was searching in Google and the other codes just say the name of the page and define a variable to calls its method, but in my website i can't do that.
So How can i do that? :(
Upvotes: 0
Views: 1003
Reputation: 1982
if you make the basket a user control it will become easier to handle than an iframe (which, without going into great detail is rather frowned upon). You can put the user control on the master page and you will be able to access the user control's methods (think add/remove item). As Pleun mentions, the basket data should be stored somewhere else and the basket user control will just be displaying that data.
Here is some information on user controls:
Upvotes: 1
Reputation: 8920
Probably it is a better idea to have the content of the basket stored somewhere else (Database, Session, file ).
Let's assume it s a database table.
This way your presentation is more separated from your business logic
Upvotes: 2