Solved

Multiple view in single page

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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The purpose of this video is to demonstrate how to integrate Mailchimp with Facebook. This will be demonstrated using a Windows 8 PC. Mailchimp and Facebook will be used. Log into your Mailchimp account. : Click on your name. Go to Account Setti…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

808 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