Click here to Skip to main content
15,881,281 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i am using mvc4, In my project,, i want to add cart so that when anyone click on buy item, that page direct redirect to cart with item price , item name ... please refer me any logic....... also i have set two views,, i want when i click on view one, means on computer product, next page should open only laptops regarding to that selected product.. i have used product primary key as 1.. computers 2..LED 3..Mobiles 4..cosmatics.... and i have used this primary key as foreign key like laptop primarykey 1 , foregin key Productid=1, mobile primary key 2, foregin key productID=3 .... please tell me how to set querystring so that when i click on led , only led should be displayed...... plzzzzz urgent help me...........
Posted
Comments
[no name] 4-Nov-14 3:19am    
Dear mate there is nothing with query string here. You need an action inside the controller for this.
Member 11178806 5-Nov-14 11:02am    
but what to do on controllers,,, suppose computer is an item, there is add to cart,, then i have to take computer item, computer code,price,user id user name, quantity to CART view.... how to do this using action.......
[no name] 5-Nov-14 11:17am    
What you need to do is, get all the data you need from the database and create a view model and assign the values/data and just use that view model in the view page.
I hope you get from this.
Member 11178806 6-Nov-14 1:12am    
okk gud,, but from where to store data to data base... ??? when i click on BUY , i want data should be there on next view....
[no name] 6-Nov-14 1:15am    
I think you will be having all the details of the items stored to the database, else how will you get the details?

 
Share this answer
 
v2
Comments
Member 11178806 4-Nov-14 2:23am    
noo.. i am not getting to understand from it....... really quite complicated,,,
using controller.....nd actionmethod
 
Share this answer
 
using viewbag and viewdata i think so
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900