Search Results

Search found 2654 results on 107 pages for 'partial'.

Page 3/107 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Attempting to update partial view using Ajax.ActionLink gives error in MicrosoftAjax.js

    - by mwright
    I am trying to update the partial view ( "OnlyPartialView" ) from an Ajax.ActionLink which is in the same partial view. While executing the foreach loop it throws this error in a popup box in visual studio: htmlfile: Unknown runtime error This error puts the break point in the MicrosoftAjax.js file, Line 5, Col 83,632, Ch 83632. The page is not updated appropriately. Any thoughts or ideas on how I could troubleshoot this? It was previously nested partial views, I've simplified it for this example but this code produces the same error. Is there a better way to do what I am trying to do? Index Page: <script src="../../Scripts/MicrosoftAjax.js" type="text/javascript"></script> <script src="../../Scripts/MicrosoftMvcAjax.js" type="text/javascript"></script> <ul> <% foreach (DomainObject domainObject in Model) { %> <% Html.RenderPartial("OnlyPartialView", domainObject); %> <% } %> </ul> OnlyPartialView: <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<ProjectName.Models.DomainObject>" %> <%@ Import Namespace="ProjectName.Models"%> <li> <div id="<%=Model.Id%>"> //DISPLAY ATTRIBUTES </div> <div id="<%= Model.Id %>ActionStateLinks"> <% foreach ( var actionStateLink in Model.States[0].State.ActionStateLinks) {%> <div id="Div1"> <div> <%= actionStateLink.Action.Name %> </div> <div> <%= Ajax.ActionLink("Submit this Action", "DoAction", "ViewController", new { id = Model.Id, id2 = actionStateLink.ActionStateLinkId }, new AjaxOptions{ UpdateTargetId = Model.Id.ToString()} )%> </div> </div> <br /> <%} %> </div> </li> Controller: public ActionResult DoAction(Guid id, Guid id2) { DomainObject domainObject = _repository.GetDomainObject(id); ActionStateLink actionStateLink = _repository.GetActionStateLink(id2); domainObject.States[0].StateId = actionStateLink.FollowingStateId; repository.AddDomainObjectAction(domainObject, actionStateLink, DateTime.Now); _repository.Save(); return PartialView("OnlyPartialView", _repository.GetDomainObject(id)); }

    Read the article

  • do I need to use partial?

    - by wiso
    I've a general function, for example (only a simplified example): def do_operation(operation, a, b, name): print name do_something_more(a,b,name, operation(a,b)) def operation_x(a,b): return a**2 + b def operation_y(a,b): return a**10 - b/2. and some data: data = {"first": {"name": "first summation", "a": 10, "b": 20, "operation": operation_x}, "second": {"name": "second summation", "a": 20, "b": 50, "operation": operation_y}, "third": {"name": "third summation", "a": 20, "b": 50, "operation": operation_x}, # <-- operation_x again } now I can do: what_to_do = ("first", "third") # this comes from command line for sum_id in what_to_do: do_operation(data["operation"], data["a"], data["b"], data["name"]) or maybe it's better if I use functools.partial? from functools import partial do_operation_one = do_operation(name=data["first"]["name"], operation=data["first"]["operation"], a=data["first"]["a"], b=data["first"]["b"]) do_operation_two = do_operation(name=data["second"]["name"], operation=data["second"]["operation"] a=data["second"]["a"], b=data["second"]["b"]) do_operation_three = do_operation(name=data["third"]["name"], operation=data["third"]["operation"] a=data["third"]["a"], b=data["third"]["b"]) do_dictionary = { "first": do_operation_one, "second": do_operation_two, "third": do_operation_three } for what in what_to_do: do_dictionary[what]()

    Read the article

  • Rails render partial with block

    - by brad
    I'm trying to re-use an html component that i've written that provides panel styling. Something like: <div class="v-panel"> <div class="v-panel-tr"></div> <h3>Some Title</h3> <div class="v-panel-c"> .. content goes here </div> <div class="v-panel-b"><div class="v-panel-br"></div><div class="v-panel-bl"></div></div> </div> So I see that render takes a block. I figured then I could do something like this: # /shared/_panel.html.erb <div class="v-panel"> <div class="v-panel-tr"></div> <h3><%= title %></h3> <div class="v-panel-c"> <%= yield %> </div> <div class="v-panel-b"><div class="v-panel-br"></div><div class="v-panel-bl"></div></div> </div> And I want to do something like: #some html view <%= render :partial => '/shared/panel', :locals =>{:title => "Some Title"} do %> <p>Here is some content to be rendered inside the panel</p> <% end %> Unfortunately this doesn't work with this error: ActionView::TemplateError (/Users/bradrobertson/Repos/VeloUltralite/source/trunk/app/views/sessions/new.html.erb:1: , unexpected tRPAREN old_output_buffer = output_buffer;;@output_buffer = ''; __in_erb_template=true ; @output_buffer.concat(( render :partial => '/shared/panel', :locals => {:title => "Welcome"} do ).to_s) on line #1 of app/views/sessions/new.html.erb: 1: <%= render :partial => '/shared/panel', :locals => {:title => "Welcome"} do -%> ... So it doesn't like the = obviously with a block, but if I remove it, then it just doesn't output anything. Does anyone know how to do what I'm trying to achieve here? I'd like to re-use this panel html in many places on my site.

    Read the article

  • MVC: Upload image in partial view, routing problem

    - by D.J
    I am trying to upload images via a form which sits in partial view using MVC. View Code: <form action="/Item/ImageUpload" method="post" enctype="multipart/form-data"> <%= Html.TextBox("ItemId",Model.ItemId) %> <input type="file" name="file" id="file" /> <input type="submit" value="Add" /> </form> Action Code: public void ImageUpload(string ItemId, HttpPostedFileBase file) { // upload image // Add Image record to database // Associate Image record to Item record //Go back to existing view where the partial view sits RedirectToAction("Details/"+ItemId); } The Image is uploaded successful All the data manipulation are working as expected However instead of redirect to view "Item/Details/id", page went to "/Item/ImageUpload" I tried several different way of doing this including using jsonResultAction, but all failed in this same result. where did i do wrong, any ideas? thanks in advance

    Read the article

  • Calling a MVC2 partial view using jquery returns empty string problem

    - by Jason
    I have an issue where I have a partial view that returns some HTML to be displayed. Its called when something is clicked on the page using jquery. The problem is that no matter how I call it, i get back an empty string even though it reports success. This is happening to me using Chrome, going against my local machine. My controller looks like this: public ActionResult MyPartialView() { return PartialView(model); } I have tried jquery using .get(), .post() and .load() and all have the same results. Here is an example using .post(): $.post(url, function (data) { alert(data); }); The result always comes back as an empty string. I can navigate to the partial view in the browser manually and i get back the desired HTML. The URL I am using to call it I resolved fully so it looks like "http://localhost/controller/mypartialview" rather than using the relative path of "/controller/mypartialview" which I thought was the original problem. Any idea what may cause this?

    Read the article

  • putting <%=yield %> in a partial for ajax jquery calls

    - by odpogn
    I'm trying to make the "home" link in my <%= render 'layouts/header' %> do an ajax/jquery call to change the <%= yield %> in a partial inside my content div. all i get are blanks in the view.. <%= yield %> works fine when put in a partial without ajax, but it doesn't display anything when using ajax... can yield not be used this way? all I'm really looking for is the ability to click on my sites navigation links without having to reload the entire page... my application.html.erb file looks like so: <head> $(function() { $("#home").live("click", function() { $.get(this.href, null, null, "script"); return false; }); }); </head> <body> <div id="container"> <%= render 'layouts/header' %> <div id="content"> <%= render 'layouts/content' %> </div> <%= render 'layouts/footer' %> </div> </body> my <%= render 'layouts/header' %> contains: <%= link_to "Home", root_path, :id => "home" %> my <%= render 'layouts/content' %> only contains: <%= yield %> home.js.erb $("#content").html("<%= escape_javascript(render("layouts/content")) %>");

    Read the article

  • Passing additional data value to strongly typed partial views in ASP.NET MVC

    - by fearofawhackplanet
    I have an OrderForm domain class, which has property subclasses, something like: interface IOrderForm { int OrderId { get; } ICustomerDetails CustomerDetails { get; set; } IDeliveryDetails DeliveryDetails{ get; set; } IPaymentsDetails PaymentsDetails { get; set; } IOrderDetails OrderDetails { get; set; } } My "Details" view is strongly typed inheriting from IOrderForm. I then have a strongly type partial for rendering each section: <div id="CustomerDetails"> <% Html.RenderPartial("CustomerDetails", Model.CustomerDetails); %> </div> <div id="DeliveryDetails"> <% Html.RenderPartial("DeliveryDetails", Model.DeliveryDetails); %> </div> ... etc This works ok up to this point, but I'm trying to add some nice ajax bits for updating some parts of the order form, and I've realised that each of my partial views also needs access to the IOrderForm.OrderId. Whats the easiest way to give my partials access to this value?

    Read the article

  • What's special about currying or partial application?

    - by Vigneshwaran
    I've been reading articles on Functional programming everyday and been trying to apply some practices as much as possible. But I don't understand what is unique in currying or partial application. Take this Groovy code as an example: def mul = { a, b -> a * b } def tripler1 = mul.curry(3) def tripler2 = { mul(3, it) } I do not understand what is the difference between tripler1 and tripler2. Aren't they both the same? The 'currying' is supported in pure or partial functional languages like Groovy, Scala, Haskell etc. But I can do the same thing (left-curry, right-curry, n-curry or partial application) by simply creating another named or anonymous function or closure that will forward the parameters to the original function (like tripler2) in most languages (even C.) Am I missing something here? There are places where I can use currying and partial application in my Grails application but I am hesitating to do so because I'm asking myself "How's that different?" Please enlighten me.

    Read the article

  • MVC - Ajax form - return partial view doesnt update in <div> target

    - by Jack
    I have an index view that I want to update automatically as the user types in a client id. I got something similiar to work (only it was updating just a label) - but this will not work. What happens is the partial is just rendered by itself (not in place of the UpdateTargetID). So the data is rendered on a new page. Here is my code: Controller: public ActionResult ClientList(string queryText) { var clients = CR.GetClientLike(queryText); return PartialView("ClientIndex", clients); } Partial View: <table> <thead> <tr> <td>Client ID</td> <td>Phone1</td> <td>Phone2</td> <td>Phone3</td> <td>Phone4</td> </tr> </thead> <tbody> <% if (Model != null) { foreach (Client c in Model) { %> <tr> <td><%= Html.Encode(c.ClientID)%></td> <td><%= Html.Encode(c.WorkPhone)%></td> <td><%= Html.Encode(c.WorkPhone1)%></td> <td><%= Html.Encode(c.WorkPhone2)%></td> <td><%= Html.Encode(c.WorkPhone3)%></td> </tr> <% } } %> </tbody> Main View: Insert code messed up, so this is just copy/pasted: $(function() { $("#queryText").keyup(function() { $('#sForm').submit(); }); }); <% using (Ajax.BeginForm("ClientList", /* new { queryText = Form.Controls[2] ?? }*/"", new AjaxOptions { UpdateTargetId = "status", InsertionMode = InsertionMode.Replace }, new { @id = "sForm" })) { % <% } % <div id="status" class="status" name="status"> <%--<% Html.RenderPartial("ClientIndex", ViewData["clients"]); %> Should this be here???? --%> </div>

    Read the article

  • ASP.NET MVC 2 loading partial view using jQuery - no client side validation

    - by brainnovative
    I am using jQuery.load() to render a partial view. This part looks like this: $('#sizeAddHolder').load( '/MyController/MyAction', function () { ... }); The code for actions in my controller is the following: public ActionResult MyAction(byte id) { var model = new MyModel { ObjectProp1 = "Some text" }; return View(model); } [HttpPost] public ActionResult MyAction(byte id, FormCollection form) { // TODO: DB insert logic goes here var result = ...; return Json(result); } I am returning a partial view that looks something like this: <% using (Html.BeginForm("MyAction", "MyController")) {%> <%= Html.ValidationSummary(true) %> <h3>Create my object</h3> <fieldset> <legend>Fields</legend> <div class="editor-label"> <%= Html.LabelFor(model => model.ObjectProp1) %> </div> <div class="editor-field"> <%= Html.TextBoxFor(model => model.Size.ObjectProp1) %> <%= Html.ValidationMessageFor(model => model.ObjectProp1) %> </div> div class="editor-label"> <%= Html.LabelFor(model => model.ObjectProp2) %> </div> <div class="editor-field"> <%= Html.TextBoxFor(model => model.ObjectProp2) %> <%= Html.ValidationMessageFor(model => model.ObjectProp2) %> </div> <p> <input type="submit" value="Create" /> </p> </fieldset> <% } %> Client side validation does not work in this case. What is more the script that contains validation messages also isn't included in the view that's returned. Both properties in my model class have Required and StringLength attributes. Is there any way to trigger client side validation in a view which has been loaded like this?

    Read the article

  • $(document).ready() and partial view load

    - by user252160
    I am developing an application using Asp.net mvc and jquery. I'd like to use the same naming convention (classes and ids) for html elements in different views. In case when I want to load a partial view asynchronously, the $(document).ready() piece of code in the main view loses its usefulness because none of the patial view's html tags and css naming is recognized by jquery. I certainly do not want to write the same code for every view. What's th ebest way to solve this issue?

    Read the article

  • ColdFusion CFC implementation of C# Partial Class?

    - by Brian David Berman
    Does ColdFusion offer a mechanism for splitting CFCs into multiple files? I am NOT talking about extension, I am talking about splitting the SAME CFC into multiple files; the same way C# allows for "partial" classes. The reason for this is because I am using T4 to generate a bunch of CFCs and I want to be able to tag functionality onto the generated CFC by doing so in another file. I want to do this in a way that doesn't violate the Open-Closed Principle.

    Read the article

  • asp.net MVC Partial Views how to initialise javascript

    - by Simon G
    Hi, I have an edit form that uses an ajax form to submit to the controller. Depending on the data submitted I redirect the user to one of two pages (by returning a partial view). Both pages rely on javascript/jquery and neither use anything common between the pages. What is the best way to initialise these javascripts on each page? I know there is the AjaxOption OnComplete but both pages are quite dynamic depending on the Model passed and I would rather keep the javascript for both pages seperate rather than having a common method. Thanks

    Read the article

  • Edit and Create view using EditCreate.ascx partial in ASP.NET MVC

    - by mare
    If you look at the NerdDinner example of creating and editing dinners then you see they use a partial (ViewUserControl or ASCX) DinnerForm to put the functionality of creating and editing dinners into one file because it is essential the same and they use it using RenderPartial("DinnerForm"). This approach seems fine for me but I've run into a problem where you have to add additonal route values or html properties to the Form tag. This picks up the current action and controller automatically: <% using (Html.BeginForm()) { %> However, if I use another BeginForm() overload which allows to pass in enctype or any other attribute I have to do it like this: <% using ("Create", "Section", new { modal = true }, FormMethod.Post, new { enctype = "multipart/form-data" })) and as you can see we lose the ability to automatically detect in which View we are calling RenderPartial("OurCreateEditFormPartial"). We can't have hardcoded values in there because in Edit View this postback will fail or won't postback to the right controller action. What should I do in this case?

    Read the article

  • Dynamically render partial templates using mustache

    - by btakita
    Is there a way to dynamically inject partial templates (and have it work the same way in both Ruby & Javascript)? Basically, I'm trying to render different types of objects in a list. The best I can come up with is this: <div class="items"> {{#items}} <div class="item"> {{#is_message}} {{< message}} {{/is_message}} {{^is_message}} {{#is_picture}} {{< picture}} {{/is_picture}} {{^is_picture}} {{/is_picture}} {{/is_message}} </div> {{/items}} </div> For obvious reasons, I'm not super-psyched about this approach. Is there a better way? Also note that the different types of models for the views can have non-similar fields. I suppose I could always go to the lowest common denominator and have the data hash contain the html, however I would rather use the mustache templates.

    Read the article

  • How do I generate optimized SQL with my (added) partial methods on LINQ entities

    - by Ra
    Let's say I have a Person table with a FirstName and LastName column. I extended the Person LINQ entity class with a get property "FullName", that concatenates the first and last names. A LINQ query like: from person... select fullName where id = x generates SQL selecting all Patient columns, since FullName is evaluated after firing the query. I would like to limit the select clause to only the 2 columns required. This is a simple example, but the limitation it shows is that I cannot isolate my business/formatting rules but have to embed them in the LINQ query, so they're not reusable (since it is in the select part) or I need select both columns separately, and then concatenate them higher up in the data or business layer with static helper methods. Any ideas for a clean design using the entity partial classes or extensions? Thanks

    Read the article

  • Partial template specialization: matching on properties of specialized template parameter

    - by Kenzo
    template <typename X, typename Y> class A {}; enum Property {P1,P2}; template <Property P> class B {}; class C {}; Is there any way to define a partial specialization of A such that A<C, B<P1> > would be A's normal template, but A<C, B<P2> > would be the specialization? Replacing the Y template parameter by a template template parameter would be nice, but is there a way to partially specialize it based on P then? template <typename X, template <Property P> typename Y> class A {}; // template <typename X> class A<X,template<> Y<P2> > {}; <-- not valid Is there a way by adding traits to a specialization template<> B<P2> and then using SFINAE in A?

    Read the article

  • Problem with jquery #find on partial postback

    - by anonymous
    I have a third party component. It is a calendar control. I have a clientside event on it which fires javascript to show a popup menu. I do everything client side so I can use MVC. dd function MouseDown(oDayView, oEvent, element) { try { e = oEvent.event; var rightClick = (e.button == 2); if (rightClick) { var menu = $find("2_menuSharedCalPopUp"); menu.showAt(200, 200, e); } } catch (err) { alert("MouseDown() err: " + err.description); } } The javascript fires perfectly withe $find intially. I have another clientside method which updates the calendar via a partial postback. Once I have done this all subsequent MouseDowns( rightclicks) which use the $find statment error with 'null'. All similar problems people have out there seem to be around calling javascript after a postback - with solutions being re-registering an event using PageRequestManager or registering a clientside function on the server - et cetera. However, the event is firing, and the javascript working - it's the reference in the DOM that seems an issue. Any ideas?

    Read the article

  • page.insert_html not rendering partial correctly

    - by mathee
    The following is in the text_field. = f.text_field :title, :size => 50, :onchange => remote_function(:update => :suggestions, :url => {:action => :display_question_search_results}) The following is in display_questions_search_results.rjs. page.insert_html :bottom, 'suggestions', :partial => 'suggestions' Whenever the user types, I'd like to search the database for any tuples that match the keywords in the text field. Then, display those results. But, at the moment, _suggestions.haml only contains the word "suggestions!!". But, instead of seeing "suggestions!!" in the suggestions div tag, I get: try { Element.insert("suggestions", { bottom: "suggestions!!" }); } catch (e) { alert('RJS error:\n\n' + e.toString()); alert('Element.insert(\"suggestions\", { bottom: \"suggestions!!\" });'); throw e } I've been trying to find out why this is being done, but the previously asked questions I found seem more complicated than what I'm doing...

    Read the article

  • Issue with class template partial specialization

    - by DeadMG
    I've been trying to implement a function that needs partial template specializations and fallen back to the static struct technique, and I'm having a number of problems. template<typename T> struct PushImpl<const T&> { typedef T* result_type; typedef const T& argument_type; template<int StackSize> static result_type Push(IStack<StackSize>* sptr, argument_type ref) { // Code if the template is T& } }; template<typename T> struct PushImpl<const T*> { typedef T* result_type; typedef const T* argument_type; template<int StackSize> static result_type Push(IStack<StackSize>* sptr, argument_type ptr) { return PushImpl<const T&>::Push(sptr, *ptr); } }; template<typename T> struct PushImpl { typedef T* result_type; typedef const T& argument_type; template<int StackSize> static result_type Push(IStack<StackSize>* sptr, argument_type ref) { // Code if the template is neither T* nor T& } }; template<typename T> typename PushImpl<T>::result_type Push(typename PushImpl<T>::argument_type ref) { return PushImpl<T>::Push(this, ref); } First: The struct is nested inside another class (the one that offers Push as a member func), but it can't access the template parameter (StackSize), even though my other nested classes all could. I've worked around it, but it would be cleaner if they could just access StackSize like a normal class. Second: The compiler complains that it doesn't use or can't deduce T. Really? Thirdly: The compiler complains that it can't specialize a template in the current scope (class scope). I can't see what the problem is. Have I accidentally invoked some bad syntax?

    Read the article

  • Resolve a URL from a Partial View (ASP.NET MVC)

    Working on an ASP.NET MVC application and needed the ability to resolve a URL from a partial view. For example, I have an image I want to display, but I need to resolve the virtual path (say, ~/Content/Images/New.png) into a relative path that the browser can use, such as ../../Content/Images/New.png or /MyAppName/Content/Images/New.png. Astandard view derives from the System.Web.UI.Page class, meaning you have access to the ResolveUrl and ResolveClientUrl methods. Consequently, you can write markup/code like the following:' /The problem is that the above code does not work as expected in a partial view. What's a little confusing is that while the above code compiles and the page, when visited through a browser, renders, the call to Page.ResolveClientUrl returns precisely what you pass in, ~/Content/Images/New.png, in this instance. The browser doesn't know what to do with ~, it presumes it's part of the URL, so it sends the request to the server for the image with the ~ in the URL, which results in a broken image.I did a bit of searching online and found this handy tip from Stephen Walther - Using ResolveUrl in an HTML Helper. In a nutshell, Stephen shows how to create an extension method for the HtmlHelper class that uses the UrlHelper class to resolve a URL. Specifically, Stephen shows how to add an Image extension method to HtmlHelper. I incorporated Stephen's code into my codebase and also created a more generic extension method, which I named ResolveUrl.public static MvcHtmlString ResolveUrl(this HtmlHelper htmlHelper, string url) { var urlHelper = new UrlHelper(htmlHelper.ViewContext.RequestContext); return MvcHtmlString.Create(urlHelper.Content(url)); }With this method in place you can resolve a URL in a partial view like so:' /Or you could use Stephen's Html.Image extension method (althoughmy more generic Html.ResolveUrl method could be used in non-image related scenarios where you needed to get a relative URL from a virtual one in a partial view). Thanks for the helpful tip, Stephen!Happy Programming!Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Resolve a URL from a Partial View (ASP.NET MVC)

    Working on an ASP.NET MVC application and needed the ability to resolve a URL from a partial view. For example, I have an image I want to display, but I need to resolve the virtual path (say, ~/Content/Images/New.png) into a relative path that the browser can use, such as ../../Content/Images/New.png or /MyAppName/Content/Images/New.png. Astandard view derives from the System.Web.UI.Page class, meaning you have access to the ResolveUrl and ResolveClientUrl methods. Consequently, you can write markup/code like the following:' /The problem is that the above code does not work as expected in a partial view. What's a little confusing is that while the above code compiles and the page, when visited through a browser, renders, the call to Page.ResolveClientUrl returns precisely what you pass in, ~/Content/Images/New.png, in this instance. The browser doesn't know what to do with ~, it presumes it's part of the URL, so it sends the request to the server for the image with the ~ in the URL, which results in a broken image.I did a bit of searching online and found this handy tip from Stephen Walther - Using ResolveUrl in an HTML Helper. In a nutshell, Stephen shows how to create an extension method for the HtmlHelper class that uses the UrlHelper class to resolve a URL. Specifically, Stephen shows how to add an Image extension method to HtmlHelper. I incorporated Stephen's code into my codebase and also created a more generic extension method, which I named ResolveUrl.public static MvcHtmlString ResolveUrl(this HtmlHelper htmlHelper, string url) { var urlHelper = new UrlHelper(htmlHelper.ViewContext.RequestContext); return MvcHtmlString.Create(urlHelper.Content(url)); }With this method in place you can resolve a URL in a partial view like so:' /Or you could use Stephen's Html.Image extension method (althoughmy more generic Html.ResolveUrl method could be used in non-image related scenarios where you needed to get a relative URL from a virtual one in a partial view). Thanks for the helpful tip, Stephen!Happy Programming!Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • ASP.NET MVC Strongly Typed Partial View, gives could not load type error

    - by Matt
    I am attempting to create a strongly typed view with a "MVC View User Control" that is being rendered using Html.RenderPartial(). The top of my ascx file looks like this: <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<System.Collections.IEnumerable<string>>" %> There is nothing else on this page, currently. When I execute the app and load the page that renders this control, I get the following error: Could not load type 'System.Web.Mvc.ViewUserControl<System.Collections.IEnumerable<string>>'. So, then I simplified it: <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<String>" %> And then, just in case it needed to be fully qualified: <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<System.String>" %> Everytime I get the same error (substituting type). what am I doing wrong here? I'm on .NET 3.5 with ASP.NET MVC 1.0 RTM.

    Read the article

  • Rendering a derived partial view with Html.RenderPartial

    - by FreshCode
    Calling Html.RenderPartial("~/Views/Payments/MyControl.ascx"); from a view works if Method.ascx is a control that directly inherits System.Web.Mvc.ViewUserControl. However, if the control inherits a new class that derives from System.Web.Mvc.ViewUserControl, the call to Html.RenderPartial("~/Views/Payments/MyDerivedControl.ascx"); fails, reporting that no such view exists. Example derived ViewUserControl: class MyDerivedControl : System.Web.Mvc.ViewUserControl { public Method() { ViewData["SomeData"] = "test"; } } Is there a workaround, or is there another way I should be doing this? Perhaps an HTML helper?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >