-
Jun 26th, 2013, 06:24 AM
#1
Thread Starter
Addicted Member
[RESOLVED] Passing value from View to View
Can we pass Boolean values from one to another view...
I think its possible but not getting any idea how to...
please help me out....
-
Jun 26th, 2013, 07:53 AM
#2
Re: Passing value from View to View
Since when does one view talk to another, unless one is a partial? A view is displayed by a controller action, so any data the view receives comes from that action. If data needs to come from a previous view then that previous view needs to pass that data to the action, which it does via the URL in a get or the model in a post.
-
Jun 27th, 2013, 01:02 AM
#3
Thread Starter
Addicted Member
Re: Passing value from View to View
Yeah. Thank you jmcilhinney. I didnt know that we can pass multiple values to controller from view. Here i already was passing value to controller. Now am passing one more value as Boolean so its working...once again thanks..
-
Jun 27th, 2013, 01:41 AM
#4
Re: [RESOLVED] Passing value from View to View
The controller can pass as much data as it wants to the view. The model is just one object but it can be any object you want, i.e. it can contain as much data as you want. It could be a collection of DataSets that each contains hundreds of DataTables if you wanted. You've also got the ViewBag, which can pass as many objects as you like. Some people don't believe in using the ViewBag at all but rather passing everything via the model, defining a new type for the purpose if required. Personally, I think that the model should be used to pass all the application data for display or editing while the ViewBag should be used for metadata.
-
Jun 27th, 2013, 07:01 AM
#5
Thread Starter
Addicted Member
Re: [RESOLVED] Passing value from View to View
Yeah..whenever i googled and search on many forums, its all showing examples with single parameter thats why i got stuck.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|