MVC :: Can Not Navigate To A Controller Which Have Created?
Dec 25, 2010
i have create a new controller Cars, and then on the main menu i have specified the following on the site.Master:-
<li><%:
Html.ActionLink("All Card",
"Create",
"Cars")%></li>
but when i click on the link the following error is displyed:-Description:HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.Requested URL: /Article/CreateSo what the problem might be? Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1 Error in '/' Application.
View 3 Replies
Similar Messages:
Apr 6, 2010
I'm having trouble when removing a dynamically created control, cause, on page_load i'm creating a new controller so the control.count is not counting correctly.
Here's the code for removing a controller:
[Code]....
And if anyone is interested here's the whole code:
[URL]
View 11 Replies
Dec 28, 2010
UML and Patterns: An Introduction to Object-Oriented Analysis and Design and Iterative Development, that follows the UP(Unified Process). It uses a Grasp Controller pattern to interact with domain classes by some methods like NewSale(), AddNewItemToSale() and CloseSale. In windows form, I can instantiate a object of this class in the UI and then use its methods to perform the actions. This works well in Client apps, but when I use asp.net mvc, I cannot find a way to instantiate an object (one for each user) that was always visible for a Controller (MVC). I cannot insert as an attribute inside Controller because it always create a new one.
View 1 Replies
Nov 6, 2010
my MVC2 delete and only my delete controller is refusing to return any class information. Its really similar to my edit function and the views are all auto-generated so I don't see the problem.
Function Delete(ByVal id As Integer) As ActionResult
View 4 Replies
Aug 16, 2010
I have a simple model where a Person has Gifts. I have a view which is a list of Gifts belonging to one Person.
My problem is with the Create action for a new Gift. I want it to default to the PersonID that we are already viewing the list of Gifts for. I tried simply passing the last PersonID (they are all the same)
Html.ActionLink("Create New", "Create", new { id = Model.Last().PersonID }) which works fine if there is already at least one Gift for that person but if this is the first Gift I don't have a value.
My Gift List controller knows the PersonID I want to pass but the view doesn't.
How do I pass this PersonID from my Gift List controller to my Gift Create controller via the Gift List view? Or is there a better way to do this?
View 2 Replies
May 30, 2010
I have a filter on my MVC web site. I display some records in a few different controller actions but when moving from one action to another I want to apply those filter values.
How can I persist values from controller to controller?
Should I use Session? TempData?
I am using Structure Map for IOC.
Maybe I could have a class that contains a Property for each Session Value that I use in my application and inject it on the controllers that need session?
View 10 Replies
Mar 14, 2011
How do you get the current action / controller name in a controller or class?
i can't show it in my view but that's not what i want.
View 1 Replies
Jun 3, 2010
I have been using LINQ to SQL for quite a while (about two years). Every thing was fine until now. As usual, I created LINQ to SQL classes and built the project, then created an aspx page. However, I cannot see the DataClassesDataContext in the code behind file. It is not listed in the intellisense list.
View 5 Replies
Jan 19, 2010
For some reason I have noticed that at run time when looking at my source of my ASP.NET page there are tags being created.
<input type="hidden" name="_VIEWSTATE" id="_viewstate" value="..lots of text.." />
and
<input type="hidden" name="_EVENTVALIDATION" id="_EVENTVALIDATION" value="..lots of text.." />
Why is this and what is it for?
How can I make sure that these are not created?
View 2 Replies
Feb 12, 2010
onething is not clear to me that in asp.net 1.1 there was asp.net project type but from 2.0 there is no asp.net project type option rather
there is option called website. in website type project no solution is created and no link is created with IIS.
why microsoft design in this way from 2.0. i think there must be soldin reason & advantage behind it.
View 4 Replies
Jan 11, 2010
I'm creating a static helper class for web services I'm writing. I'm tapping into the API of Telligent and therefore creating these Telligent "service" objects that allow me to do things with the platform. For example, I'm creating a MembershipSerice object in my helper class so I can do membership stuff with the same object. In my helper class I have a property with a getter that creates a new one of these objects:
private static MembershipService _MembershipService {
get return new MembershipService(path, usr, pwd);
[code]...
View 3 Replies
Jun 2, 2010
My web page has two ways of displaying a particular content. 1. When the page is loaded, the items ( images with anchor tag) are generated using ASP Repeater. 2. When user perform some Ajax action, the images are returned as JSON and I use jQuery for creating the a & img tags.In both these methods, the anchor tags with images are displayed with width 60px. There is no CSS class applied. But strangely the display is not consistent. Here is the both displays:I wonder why this difference occur. I check this with all browsers ( IE,FF& chrome) and all behave the same. Here is my jQuery code:
$('<a>').attr({ href: '/Detail.aspx?id=' + result.it[i].pid, title: result.it[i].nam }) .html("<img src='" + result.it[i].url + "' title='" + result.it[i].nam + "' alt='" + result.it[i].nam + "' width='60px' />").appendTo("#SummaryDiv");
Any idea why this behaviour occurs? I also checked the css applied to these elements in chrome and FF.. they seems to have all the same CSS attributes.
View 1 Replies
Jul 22, 2010
C#: HomeController.vb: works fine HttpPost RsvpForm gets the object filled with user input.
using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.Mvc;using RsvpInC.Models; namespace RsvpInC.Controllers{ public class HomeController : Controller { //
[code]...
View 5 Replies
Jan 24, 2011
I have a User entity and a department entity. I have a UserViewModel and DepartmentListModel which has List of departments.
UserViewModel has a property of type DepartmentListModel .
Now on user/create action I need to populate DepartmentListModel by calling DepartmentController's list action. List action returns populated DepartmentListViewModel.
From UserController how do I set DepartmentListModel ?
I tried doing so
[Code]....
But RedirectToAction returns RediretToRouteResult
View 7 Replies
Oct 7, 2010
Adding a book to the basket and clicking on view basket displays basket fine. When clicking on the top right hand basket link the screen displays the basket as empty even though a book has been added
View 1 Replies
Jan 22, 2010
I have address column in my view with hyperlink..If i click hyper link it should navigate to the google map content menu point particular address..
View 2 Replies
Mar 30, 2010
i have two div and two Hyperlink contol all are visible. i want set hyperlink navigateurl to the div
View 2 Replies
Feb 22, 2010
I have a GridView that I load with a show button that drills into the details. I want to add a button that allows me to navigate back, but I'm not having much luck. I don't want to response.redirect("MyPage.aspx") because I don't want to have to reload the GridView.
I thought I code just add some java script to it:
Code:
ibtnBack.Attributes.Add("onclick", "javascript:history.go(-1);")
But that doesn't seem to work for some reason.
View 13 Replies
Aug 16, 2010
I am trying to Navigate URL in this way
<asp:HyperLink runat="server" NavigateUrl='javascript:NavigateUrl("<%#Eval("TicketID")%>","<%=RedirectURL %>");'><%# Eval("TicketID") %></asp:HyperLink>
but an error occurred in the javascript Error Console in Mozilla browser. Error: missing ) after argument list Source File: javascript:NavigateUrl("<%#Eval("TicketID")%>","<%=RedirectURL%20%>");
Line: 1, Column: 22
Source Code: NavigateUrl("<%#Eval("TicketID")%>","<%=RedirectURL %>");
I want to remove the error. but functionality is ok.
View 3 Replies
Jun 16, 2010
im using 2 dropdownlist which retrieve data from database.
1st dropdownlist is to retrieve all teacher list.
after select a teacher from dropdownlist1 then, 2nd dropdownlist will display student name under the particular teacher.
so, my prob is how to navigate it to "a.aspx" when I select a student name from 2nd dropdownlist.
in, 2nd dropdownlist vb my coding is response.redirect("a.aspx") but it doesn't work.
View 5 Replies
Nov 16, 2010
Whats the best way to navigate from one popup to the next?- is it via :
ModalPopup1.Show()
and
ModalPopup1.hide()
or via the visible property?can you have several modal popups hiding and showing one after the other?- because I am trying to use 3, but not sure if its best to use .vb code behind page or if it can be done via the properties on the front end in visual web developer?
View 3 Replies
Jan 14, 2010
[Code]....
Navigate between controllers using ActionLink in mvc2
View 2 Replies
Mar 15, 2011
In VS2010, when looking at a .CS code file, if I press F12 to "Go to Definition", is there a way to go back to where I just was?
View 1 Replies
Sep 15, 2010
I am working on the Home Page of a new client. The client wants me to show 5 images in his home page, which he does not want to part with.I am using a master page and also a user control in the home page.All this make the home page too heavy(if this is the right word).All are .jpg images.
The master page contains logos and the user control is a table containing hyperlink to navigate to other web pages.
View 4 Replies
Feb 14, 2011
how can i navigate website from sitemappath control?
View 1 Replies