Solved

Multiple view in single page

Posted on 2011-03-07
7
666 Views
Last Modified: 2013-11-19
how do i use multiple view in single page,suppose that in one view i have only textarea and button and once
i click the button then whatever i enterd in text area it shows me
on other view in a label on same page.
0
Comment
Question by:nicemanish
  • 2
  • 2
7 Comments
 
LVL 15

Expert Comment

by:mish33
ID: 35116649
Put javascript in onclick button attribute that replace labal.html with textarea.value
0
 
LVL 12

Expert Comment

by:jmcmunn
ID: 35121377

Here is one example of using javascript to show/hide content with javascript.  You can simply set the html of the div that you show to whatever they typed into the textbox.

http://www.randomsnippets.com/2008/02/12/how-to-hide-and-show-your-div/

It sounds like you are doing kind of a wizard?  If so there are several good wizards out there based in javascript.  I can post some if you are interested.
0
 

Author Comment

by:nicemanish
ID: 35135286
Hi ,

as i am using mvc Frame work there is a concept of model view and controller.
My question was i want to take two views on the same page and from the first view i want to send some data to 2nd
view.how i do it in mvc frame work?
0
 
LVL 12

Accepted Solution

by:
jmcmunn earned 500 total points
ID: 35137200

All you have to do is use a typed view and bind the text box in the first view to the model, and then use a form to post the model into your controller.

In the post action, grab that data back out of the model that is passed in.  From there you can either fill a new model with that data, or just pass the same model along, or stick the string you want in ViewData for the next view to consume.

Here is some basic info on models.  If you have more specific questions let me know.

http://msdn.microsoft.com/en-us/library/dd410405.aspx
0
 

Author Closing Comment

by:nicemanish
ID: 35277342
its help to find out right direction
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Read about why website design really matters in today's demanding market.
"In order to have an organized way for empathy mapping, we rely on a psychological model and trying to model it in a simple way, so we will split the board to three section for each persona and a scenario and try to see what those personas would Do,…
The purpose of this video is to demonstrate how to Import and export files in WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Click on Too…
The viewer will learn how to count occurrences of each item in an array.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now