?
Solved

MVC3 User Control issue

Posted on 2011-09-10
3
Medium Priority
?
532 Views
Last Modified: 2012-05-12
I am totally new in MVC framework and i am using MVC3 framework

In am application i need to create MVC user control or partialview, for that i created MVC user control and in there i have couple of Html.Dropdownlist now i added this MVC user control in my pageView and calling my partial view using code

Html.RenderPartial("controlName");

but the problem is controler of usercontrol/partialview not executing index method or any method in controller so this is my issue please help me, how i will solve this.

Thanks
0
Comment
Question by:farjack1
[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
3 Comments
 
LVL 10

Accepted Solution

by:
Irzana earned 80 total points
ID: 36517862
Html.RenderPartial takes partialviewName as parameter, not controller name

Try using

Html.RenderPartial(partilaViewName)
0
 

Assisted Solution

by:farjack1
farjack1 earned 0 total points
ID: 36526274
thanks i found out the Ans, the Ans si

Html.RenderAction("partilaViewName", "MethodName");
0
 

Author Closing Comment

by:farjack1
ID: 36553545
As per my question my controler of user control was noy executing, so as i provided the code that is working.

Thanks
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

WHY MVC is the future technology... As many of you know, MVC is Model,View,Controller pattern. Model View Controller pattern was invented in a Smalltalk context at Xerox in late 1970s. Why is this buzz about MVC: --------------------------- …
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Suggested Courses
Course of the Month10 days, 1 hour left to enroll

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