?
Solved

Multiple view in single page

Posted on 2011-03-07
7
Medium Priority
?
720 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Originally, this post was published on Monitis Blog, you can check it here . It goes without saying that technology has transformed society and the very nature of how we live, work, and communicate in ways that would’ve been incomprehensible 5 ye…
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
The purpose of this video is to demonstrate how to prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

770 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