MVC :: The View 'Index' Or Its Master Was Not Found?
Oct 31, 2010
I created a MVC project. Added a area "SampleArea". Then added a controller "Log" in the area. Generate a view for "Index" in the log controller.
Modified the global.asax to this
routes.MapRoute(
"Default", // Route name
"{area}/{controller}/{action}/{id}", // URL with parameters
new { area = "SampleArea", controller = "Log", action = "Index", id = UrlParameter.Optional } // Parameter defaults
);
I also modified
ontext.MapRoute(
"SampleArea_default",
"SampleArea/{controller}/{action}/{id}",
new { controller="Log", action = "Index", id = UrlParameter.Optional }
);
Pressed F5 and it is giving err "The view 'Index' or its master was not found". How do i fix it?
The sample can be downloaded from here [URL]
View 4 Replies
Similar Messages:
Apr 27, 2010
I've create an asp.net MVC 2 project, it works fine!!
I've been asked to integrate the project in an existing web project in classic asp.net
(I've add the folder containing the source, and not make a new project, because they have to bee in same project)
I've configured my web.config file
<pages pageBaseType="System.Web.UI.Page" >
<controls>
<add tagPrefix="asp"
namespace="System.Web.UI"
assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add tagPrefix="asp".......
View 1 Replies
Nov 16, 2010
I'm at the moment trying to learn to create gadgets for EPiServer, and to do that I have to go through MVC, which I'm a bit new to. I'm following this tutorial:[URL]The solution has 2 projects in it just like the tutorial does, the first one is the EPiServer project and the 2nd one is the gadget MVC project called QuickChat.In the EpiServer project I write in the config (just like the tutorial) to point out the gadget:
<publicModules rootPath="~/public/" autoDiscovery="Minimal">
<add name="QuickChat">
<assemblies>
[code]...
View 5 Replies
Feb 26, 2010
Here is my code in SQL
[Code]....
Error i am facing is :
Msg 8668, Level 16, State 0, Line 2
Cannot create the clustered index 'RateViewIndex' on view 'NoteToPass.dbo.RateView' because the select list of the view contains an expression on result of aggregate function or grouping column. Consider removing expression on result of aggregate function or grouping column from select list.
View 1 Replies
Jan 25, 2011
I have two control page in my aspx page. first one left side "tree view",second one right side " form design".Form design will change based on tree view selected index changed.i have 4 level child node(site, master , slave, space). I have seperate forms to each level of node.
cannot update tree node when update the forms. so i reload tree view.
now i need how to auto selected index change to tree node.
ex.
1 parent node
1.1 child node
1.2 child node
i have update "1.2 child node" rename to "1.3 child node"
and reload treeview so it will chage...
how set tree node.selected index = 1.3 child node....
View 3 Replies
Oct 20, 2010
i have the following problem concerning the index::
my source code::
[Code]...
the problem is appeared when i have added the pager to my list view ,,i have out of range for index exception ... how to determine the page iam in and specify the right index either i use list view or grid view or other such controls..
View 1 Replies
Aug 17, 2010
I'm trying to use the
ajaxtoolkit dynamic poplulate..
+ $exception {"The TargetControlID of 'DynamicPopulateFileDownloadUI' is not valid. A control with ID 'PanelDownLoadUI' could not be found."} System.Exception {System.InvalidOperationException}
[Code]....
View 5 Replies
Sep 8, 2010
Members view (index) that lists members that users can select to show a partial view in the same view with details for the selected memberUses jquery (Ajax.ActionLink) to call a partial view method in the members controller to then load the members detail sectionWorks fine up to here....but I'd like to load the partial view with "member" details for a default or random member on initial load -- ie not through the Actionlink selectionHow do I invoke the partial view method on the initial load?
View 4 Replies
Sep 3, 2010
Trying to create a strongly typed view but the model "that is a class" is not listed in the "View data class" dropdown?
View 3 Replies
Dec 9, 2010
I am using a set of codes for all web pages
grvcity.PageIndex + = 1;
to get the next page in grid view
I want to caluclate the page index where the currently is on . How to do it
View 1 Replies
Apr 13, 2010
I set a breakpoint on my httppost view and found that the value from a checkbox field was 'true,false" even though it was checked..how come it displays both values?
I created the create template using editorformodel(). The field using this checkbox is of bit datatype.
The action code is below;
[Code]....
View 3 Replies
Jul 14, 2010
I'm trying to do an Ajax delete in a fairly standard Index few, i.e. I have a generated Index view with one added filter drop-down, of little relevance here. I have changed the free Delete Html.ActionLink on every row to an Ajax.ActionLink, and the delete and ajax update work, but whichever container div I try and update, I always somehow get some kind of nesting in the updated page, e.g. after a delete and update, I get duplicate Home and About links from the master page inside my content. Here is my current action link that causes what I describe above:
<%: Ajax.ActionLink("Delete", "Delete", new { id = item.InstallationDBNumber }, new AjaxOptions { UpdateTargetId = "jobList" }) %>
... and here is where jobList is located, just outside the table used for the index list:
<div style="clear: both;">
</div>
<div id="jobList" class="index-list">
<table>
<tr>
View 1 Replies
Mar 25, 2011
I am using the following in the index page of a normal view.
Index
Index
User Listing
View 2 Replies
Feb 16, 2010
I used to be able to view the pages of my ASP.NET 3.5 website locally via the 'View in Browser' facility. However, this no longer works (for any page). All I get is a 'HTTP 404 Not Found' error message.
Where might I have screwed things up?
View 4 Replies
Mar 11, 2010
I have a gridview with dynamic buttons for edit and save.Save button is disable by default. In the edit button command argument i bind the id of the record.
now when i click edit button i want my save button to get enable and edit button will disable for that particular row. I dont kow how to get the selected row index through dynamic button.
View 3 Replies
Jun 30, 2010
As far as I can work out I should be able to copy a web project/application to my IIS Web server and be able to see it as I do when designing it on my development computer.
The problem is once I copy the folder over to my web server and then try to view it the browser it says Error 404 not found. There must be a real simple fix for this. I would like to be able to develop ASP.NET sites using the Visual Web Developer instead of Dreamweaver but this little issue is stopping me.
View 1 Replies
Mar 16, 2011
I am trying to capture the SelectedIndexChanged event for a drop down list I have put inside of a gridview control. It posts back fine, but does not go into my SelectedIndexChanged event handler. Here is my code
[Code]....
it is still not going into my myddl_SelectedIndexChanged() eventhandler.
View 1 Replies
Mar 5, 2010
Here is my code in SQL
[Code]....
Error i am facing is :Msg 8668, Level 16, State 0, Line 2Cannot create the clustered index 'RateViewIndex' on view 'NoteToPass.dbo.RateView' because the select list of the view contains an expression on result of aggregate function or grouping column. Consider removing expression on result of aggregate function or grouping column from select list.
View 4 Replies
Jun 7, 2010
I have a Web Site project, and within it I have a user Web Control defined in an ascx file.The control is added to the Site.Master, and it shows up correctly on the page and everything is fine.I need to override some of the control's fields on one of the pages that derive from Site.Master.
// In OnLoad:
MyControlName control = (MyControlName) Page.Master.GetBaseMasterPage().FindControl("controlID"));
The issue is that MyControlName doesn't register as a valid Type on the child page. If I add a second instance of the control to the child page directly, the above works as needed, but if the control isn't placed directly on the page, and instead is only defined in the master page, the type is undefined. The control is not in a namespace, and is defined within the project, so I don't know why it is having such an issue location the appropriate type.If I put a breakpoint in the OnLoad, the type listed for the control is ASP.my_control_name_ascx, but using that does not work either. Why can't the child class reference the correct type? Can I fix this?
View 3 Replies
Feb 8, 2010
i have a drop down list and a text box, inside a listview row (and this is a repeating layout). i populate each dropdownlist with same contents ( these contents/items come from a custom collection object).
i have added a required field validator in the listview's item template, that has its validation group = the validation group of the drop down list, and validates if the textbox is blank or not. this validation takes place on the selected index changed of the drop downlist for that row.
1. on selected index changed, EACH dropdownlist validates only its corressponding textbox perfectly (which is what i want)
but if i enter some text in one of the textboxes after doing 1, the dropdownlist for THAT particular row, assigns the correct value to the text entered. but for other rows (for which i changed their corresponding ddls to test the required field validation and for which the text boxes are still blank), their ddls by itself assign the values to the blank text without validating.
markup of code for listview is [Code]....
code behind for the ddl selected index changed is [Code]....
method GetIndexFromId retrieves index of the custom object inside a collection depending on the Id (which is a property) of the object.
i notice that the ddl selectedindexchanged is being hit as many number of times as many rows i change (i.e as many ddls in different rows i change to check the required field validation)
View 7 Replies
Aug 10, 2010
Master Detail (in the same view)
View 3 Replies
Sep 28, 2010
I was reading: [URL]
But I have give a compilation error:
CS0246: The type or namespace name 'DataTable' could not be found (are you missing a using directive or an assembly reference?
View 1 Replies
Jun 29, 2010
I created a base Controller for the other Controllers to derrive from, and in that controller I overrode the OnActionExecuting method so that each time any Controller executes a method, I can run some code. In that code I added a value to ViewData, and in the Master View I want to either display certain items or not based on the value of the ViewData item set. The problem is, once I get to the Master View, the ViewData doesn't have anything in it. I am not sure what I'm doing wrong.
View 1 Replies
Mar 12, 2011
I have used the xslt code from Steven Sandersons book 'Pro ASP.NET MVC2 Framework' for the xslt view engine and that is working perfectly. However I am now looking at using a master page for the header, footer, and navigation sections and only need to use my other xslt files to populate the content part.
View 3 Replies
Jan 16, 2011
I am trying to implement something like Ruby on Rail's ActionDispatch::Flash to pass messages to the next page request. The approach that I want to take is to store a pair of (partial view name, model object) in the session context and render it in the master page when rendering the request to display the flash message.
Inside my HttpApplication subclass I now have:
[Code]....
to render the partial view that was specified by name when Global#Flash was called.
I want to use a view for the flash message instead of saving the message as a string in the session context because I want to include the URL in the message:
<%-- BookmarkAddedFlash.ascx --%>
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<MyApp.Web.Models.Bookmark_AddModel>" %>
<%: Html.DisplayTextFor(m => m.Url) %> was successfully bookmarked.
And I only want to render the view when the subsequent request is made; i.e. one request sets the flash message and the subsequent request renders it.
View 2 Replies