Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

MVC3 User Control issue

Posted on 2011-09-10
3
Medium Priority
?
541 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Recently I spent hours debugging an issue in a Rails project where ActiveRecord was causing MySQL errors trying to create a User object of a class at the top level of a Single Table Inheritance model structure.  It turns out `.create` behaves differ…
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…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

597 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