I create a new mhc application with razor data view engine. I have a problems with the url
Here is my action links
#Html.ActionLink("Home", "Index")
#Html.ActionLink("Schedule", "Schedule")
After I loaded home page my url looks fine
Example: mysiteurl.com
Then I click Schedule link (if I hover I see the correct url http://mysiteurl.com/home/schedule). If I click it as a result my url will http://mysiteurl.com//#/Home/Schedule. I don't know why its adding # sign to my url but it's causing the issue in my application with other pages.
any idea what I'm doing wrong?
Do you have an action method named Schedule? Can you successfully hit it by referencing yoursite.com/Home/Schedule? If not make sure your route is correct.
Related
I am using WebSphere Portal 8 and I am facing one issue related to session clearing on Portal Page link click. I have a portal page with one single portlet (Search Portlet) and it is working fine. Then after some search I navigate to another unrelated page and again click on the link to Search Portlet. The problem is previously selected values are still present in UI.
I want to know is there any way I will know which Page Link is clicked so that I can clear session in Portlet Class. Or is there anyway to pass some parameters once a Page Link is clicked.
Thanks in Advance!
Pradeep
Portal maintains the state of the portlet, redirecting to page with clean URL will do the trick.
I've created a joomla component which consists of a html form, and when I try and browse to it:
index.php?option=com_helloworld
I get an error 404, component cannot be found.
I'm following this tutuorial:
http://docs.joomla.org/Developing_a_Model-View-Controller_Component/2.5/Developing_a_Basic_Component
Can anyone please tell me how I can browse to the page?
UPDATE: here is the link to my sample component, its a basic html form.
http://tinyurl.com/d6tj7rz
Many thanks
IIRC, even if a component is not installed correctly, you can still access the code if it's on the server, from my experience. But that may have been a 1.5 thing.
If you don't specify a view in the URL by passing &view=viewname, AND you haven't set a default fallback view, then you can't expect to have anything come up.
For a good example on how to set a default view, look in components/com_contact/controller.php line 38.
Within the main controller's display method:
// Set the default view name and format from the Request.
$vName = $this->input->get('view', 'categories');
$this->input->set('view', $vName);
I am creating dynamically loading tabs using jquery Ui tabs in my ASP.NET mvc3 project.
Here i have a product page. The product page contains left menus like Customer,Address,Contact,etc..
Here my process is when i click one my left menus, the tab created dynamically with Grid records.
And,
I'm creating a custom role provider and I set a Authorize attribute specifying a role in my controller and it's working just fine, like this:
[Authorize(Roles="SuperAdmin")]
public class SuperAdminController : Controller
...
If one user doens't have access to this controller, And click one of my left menu means,
he's redirected to login page. Its also working fine.
The problem is after the user logged in it didn't redirect the proper page in tab content area.
If my problem not understandable means please let me know..
Thanks Advance...
If you carefully check the URL in the browser, you will see that the URL does not change when you load something by Ajax. That is the point of Ajax actually, you do not load the whole page, right?
Now as the state is not saved when you try to load the content using Ajax, your redirect URL is only the page you loaded initially. That is why you cannot go back to the tab you wanted to load.
Hello in an MVC3 application,
I want to put a password on a page.
The page is accessible from an action link that calls an ActionResult in the controller. And returns the view with the model.
What is the best way or easiest way to add a password to the page.
Something like a popup that shows and you have to put a password and if you put the wrong password you don't see the page (the view is not loaded)
Thanks
You can put a filter on the page's get action.
look at the following link
http://www.asp.net/mvc/tutorials/older-versions/controllers-and-routing/understanding-action-filters-cs
Having a problem deploying an MVC application.
Basically the site loads correctly, the home page appears. However anything which needs to access a controller action does not. So all the links just throw up 404 errors.
Does anyone have an Idea why the site loads but after that the controller actions appear not to?
Thanks
Are you running your app in IIS 6? If so you'll need to configure the .mvc extension or configure wildcard mapping. Steve Sanderson has a good post on it.
The fact that the home page appears indicates that you have at least one controller working properly. Namely, the HomeController.
You should check that you are following the default conventions (if you have it set up that way)
Controllers belong in the Controllers folder and follow the naming convention [Name]Controller.
Also, every action in the controller must be public and must return an ActionResult of some kind. Returning a View will cause a particular View to be rendered.
Also, Views follow the folder structure View/[ControllerName]/[Action].aspx
The fact that the first page loads means you probably have Home/Index set up properly for both your Controller and your View. You should take a look at those and see what the difference between that is and the other controllers/actions/views that you've set up.