Solved

MVC3 User Control issue

Posted on 2011-09-10
3
530 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 20 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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

There is a huge demand for CodeIgniter among the PHP web developers due to its dynamic features and benefits these days. It is one of most popular and agile open source PHP framework for creating robust web applications in PHP web development field.…
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 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…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

734 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