Solved

Multiple view in single page

Posted on 2011-03-07
7
717 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 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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

An enjoyable and seamless user experience can go a long way on an eCommerce site. While a cohesive layout and engaging copy play roles in creating a positive user experience, some sites neglect aspects that seem marginal but in actuality prove very …
CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
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 purpose of this video is to demonstrate how to set up basic WordPress SEO. This will be demonstrated using a Windows 8 PC. The plugin used will be WordPress SEO by Yoast. Go to your WordPress login page. This will look like the following: myw…

717 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