Solved

MVC3 User Control issue

Posted on 2011-09-10
3
526 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
  • 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
C# HTTP GET method sample code 3 57
Page navigation in windows phone 8.1 application not working. 5 24
PrintingFoundIt(Almost!(Damn!)) 1 26
InputLanguage 1 25
Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
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…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

776 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