Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post May 07, 2012 02:23 PM by ignatandrei
Member
1 Points
4 Posts
May 07, 2012 01:59 PM|LINK
How to Concatenate the content of two different URL and display in one window?
example : lets say i have course and under course i have two unit (all in links form)
course link
--Unit1 Link
--Unit 2 Link
-------------------------------------------------------
1st unit contains URL1
2nd unitcontains URL2
upon clicking the course links ,i should display the content of two units combinedin single window( like book format).
Thanks in advance for the help
Vinay
All-Star
24675 Points
4250 Posts
May 07, 2012 02:12 PM|LINK
Is just as having an Index action with a string parameter
public ActionResult Index(string unit)
{
if(string.IsNullOrWhiteSpace(unit) {
//return all content
}
//return content for the specified unit
156 Points
46 Posts
May 07, 2012 02:19 PM|LINK
create a partial view (an html 'template' displaying a single unit) you should be able to google more help on that if needed
this enables you to display a unit with a single call: @Html.Partial(partialViewName, model)
in the course view you can place this call within a foreach loop
135047 Points
21654 Posts
Moderator
MVP
May 07, 2012 02:23 PM|LINK
vinayduggirala How to Concatenate the content of two different URL
Think in ViewModels, not in URL's. see http://msprogrammer.serviciipeweb.ro/2010/03/29/asp-net-mvc-orm-and-viewmodels/
vinayduggira...
Member
1 Points
4 Posts
How to Concatenate the content of two different URL and display in one window
May 07, 2012 01:59 PM|LINK
How to Concatenate the content of two different URL and display in one window?
example : lets say i have course and under course i have two unit (all in links form)
course link
--Unit1 Link
--Unit 2 Link
-------------------------------------------------------
1st unit contains URL1
2nd unitcontains URL2
upon clicking the course links ,i should display the content of two units combinedin single window( like book format).
Thanks in advance for the help
Vinay
raduenuca
All-Star
24675 Points
4250 Posts
Re: How to Concatenate the content of two different URL and display in one window
May 07, 2012 02:12 PM|LINK
Is just as having an Index action with a string parameter
public ActionResult Index(string unit)
{
if(string.IsNullOrWhiteSpace(unit) {
//return all content
}
//return content for the specified unit
}
Radu Enuca | Blog
Doctor Sid
Member
156 Points
46 Posts
Re: How to Concatenate the content of two different URL and display in one window
May 07, 2012 02:19 PM|LINK
create a partial view (an html 'template' displaying a single unit)
you should be able to google more help on that if needed
this enables you to display a unit with a single call: @Html.Partial(partialViewName, model)
in the course view you can place this call within a foreach loop
ignatandrei
All-Star
135047 Points
21654 Posts
Moderator
MVP
Re: How to Concatenate the content of two different URL and display in one window
May 07, 2012 02:23 PM|LINK
Think in ViewModels, not in URL's. see http://msprogrammer.serviciipeweb.ro/2010/03/29/asp-net-mvc-orm-and-viewmodels/