.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Start project from view => full view path appended to the URL => 404

Posted By:      Posted Date: October 08, 2010    Points: 0   Category :ASP.Net


If I start the project while in a view, it appends that view name (and path) to the URL, and I get a 404 error.


If I then switch to any non-view, like the controller and hit F5, it starts up with no additional URL and gets routed to the default controller.


 Is there a way to fix this? Is it an option (to not pass the view url on debug), or a routing cfg issue? I'm no MVC expert.

routes.MapRoute(	"Default", "{controller}/{action}/{id}", new { controller = "Home", action = "Index", id = "" } );

Thank you 

View Complete Post

More Related Resource Links

Migrate an ASP.NET MVC 2 project to MVC 3 Razor view

Hi all, I have an application which has been built in MVC 2.0. I need to upgrade it to MVC 3.0 and that too by using Razor CSHTML engine. All the information which I got on the net was for MVC 3.0 Webform engine but nothing much for migrating to Razor. I would be very grateful if somebody shows me the steps or sample walkthrough for the purpose of this migration. Any help would be greatly appreciated. Thanks and regards, Tanay.

Data View and Scheduled Start & End Dates Filtering

I have a data view that needs to display all pages that are current and the closing date is greater than or equal to today's date. The issue I am having is that the data view is displaying pages that are have the a future scheduled start date or the scheduled end date is past, i.e. something that has a start date of tomorrow, is displaying and a page that has an end date of yesterday is displaying. I can tried to filter the data view on the scheduled start and end dates but I can't see it in the Filter Options of the 'Common Data View Tasks'. I have also tried adding XSLT Filtering but am unsure how to set it up.  I have added the following as an XSLT filtering [@PublishingStartDate<=$Today or string-length(@PublishingStartDate)=0] I am wanting to check whether I have done this correctly or not. Some pages won't have a scheduled start date but all will have an end date. Below is the code from my data view: <WebPartPages:DataFormWebPart runat="server" ShowWithSampleData="False" AllowRemove="True" AllowHide="True" SuppressWebPartChrome="False" PartImageLarge="" ViewContentTypeId="" ExportMode="All" Dir="Default" MissingAssembly="Cannot import this Web Part." ID="g_fdf00570_38e8_4df9_8ab3_5ca3ed974c41" DataSourceID="" IsIncludedFilter=""

Explorer view losing folder path information

Hi all, I am writing a custom webpart to replace SP's default ListWebPart in my document library view page. But I found it can't keep the folder information when showing the "Explorer View". For example, I enter a subfolder "root/folder 1" and select "Explorer View" in  ViewToolbar, it returns the root folders content. But when I click the "Open in Windows Explorer" in ActionMenu, it returns contents of folder 1. I see the Sharepoint's ListViewWebpart does not have this problem. It can return correct contents when I enter a sub folder and click "Explorer View". The page's url contains correnct query strings about folder path (in my own webpart the query string is missing). Is it because I forget some config for the toolbar since I add it via codes? Below is my code to add the toolbar:   SPView view = this.CurrentView; if (view == null) return null; this._toolbar = new ViewToolBar(); this._toolbar.ID = this.ID + "_ViewToolBar"; this._toolbar.RenderContext = SPContext.Current; if (!String.IsNullOrEmpty(view.ToolbarTemplateName)) { this._toolbar.TemplateName = view.ToolbarTemplateName; } return this._toolbar;   Thanks a lot.  

How to link Title to it's associated page in list view without URL path column visible -bug?

I don't know if this is a bug or if I'm an idiot (or perhaps both, I'm open minded).   My site I'm developing is a site with publishing features activated where all my news stories are pages. What I want to have is a sortable list (the type hypothetically achieved using the XsltListView Web Part) the lists these pages with 3 columns visible: The Date created, the title (not the page name), and the author. The tricky part is that I would like the title, when clicked on, to take the person to the page. I'm actually almost there. I've created a new view with these specifications except for one issue. To make the title linked to the page, I have to have the column "URL Path" in my list view. When I remove this column, the titles instead all link to the root of the directory I'm in (ex: if I'm in Pages/Forms/My_List.aspx it will link to Pages/Forms/) Is this a bug, or is the URL Path required for the link to work? Is there a way to hide the column? Thanks.

Calendar View: Unable filter Recurring Event by Start/End Time and Group by Recurring Event View

Hi All,
I have just found several issues with Calendar View from WSS 3.0:

Unable to filter by [Start Time] and [End Time]
I am not sure why these 2 columns doesn't appear in the Filtering column in the View Settings. The workaround found in the internet is to create calculated column for Start Time and and End Time. However, it doesn't work for Recurring Event, the calculated column will show only first recurring event Start Time.

Unable to use "Group By"
When I create new view in Calendar using format: "Standard View, with Expanding Recurring Events", there is no option to specify "Group By". Anyone knows how to show all recurring event in List view and grouped by Start Time (or any other column).

Thank you and apprecate for any idea.

Displaying partial view/View from another project in MVC


Hi guys,

i wonder if you know which is the best way (concerning performance) to display a view from another project.

I have a cms from which i create the contents. I have my website and may in the future work for other websites. 

I have two options so far:

1) Generating the content from my cms and using it as an embedded resource in the website

2)Using http handler, i get the content from the url and response.write it on the part of the page

Please let me know if there are better options?

Thank you for your help.

Regarding Info path view


Hi Geeks,

Thanks for the help in advance.

Guys, I have a Info path form in which when a new form is made there is a field in that called DO reffered.In this the name of the user came to which that form is submitted.

We want that when that user opens that form he only sees the form in the submission mode else every one else see in read only mode.

We want this condition to be also to be followed that

But we want this condition to be follow as

I don’t what to compare with the share point users group but to check whether the logged in user has “Full Control”,”Design”,”Contribute”,”Read only rights”.

Please let me know if we can do this by some other method.

Please send me the link of the help also .

I need this help urgently.

How do I view Full-text search catalogs in SQL Server 2008 Express?


I've installed SQL Server 2008 express with advanced services on my Vista Home Premium, and have enabled Full-text search. 

"SELECT fulltextserviceproperty('IsFulltextInstalled');" returns 1, and using CREATE FULLTEXT CATALOG mycatalog I was able to create my Full-text search catalog. I was then able to create full-text indexes on my DB columns, and even search through them.

However, there is no &

Connect "Project Tasks" List's Calendar View to Outlook


I would like to connect our department's "Project Tasks"-type list to an Outlook calendar (the same way I can do with a "Calendar"-type list).  

In Sharepoint, I have a nice "Calendar View" (this is a Sharepoint View/Report using the "Calendar" format) of the "Project Tasks"-type List items showing which items were worked on in the past or are to be worked on in the future.  I would like to Connect this view to Outlook, but it appears this "Project Tasks"-type list does not have the "Connect to Outlook" option in the ACTIONS menu.  

I have confirmed that the "Connect to Outlook" option is activated in our "Enable Client Integration" settings per thread ((http://www.eggheadcafe.com/community/aspnet/69/10091824/cannot-see-connect-to-outlook-in-the-actions.aspx).  In fact, if I create a strict "Calendar"-type list (instead of a "Project Tasks"-type list or "Issue Tracking"-type list), I do get the "Connect to Outlook" option in the ACTIONS menu.  I'd li

Truly Understanding View State

This article provides a detailed understanding of the ViewState.

GridView Parent Child View with JQuery Effects

I was just checked how to add some more cool effects to the GridView control using JQuery. In this post I will display parent-child data in the GridView control with some help of the wonderful JQuery library.

Let's first populate the GridView control.

Model View Controller (MVC) for ASP.NET

Model View Controller (MVC) architectures, immediately wonder how the MVC pattern can be applied in an ASP.NET world. This article will demonstrate how the MVC pattern can be applied to an ASP.NET web application and still maintain the basic Microsoft supplied architecture.

jQuery grid view plugin

jqGridView is new, client-rich, XML-based, ajax grid plugin for jQuery library. jqGridView provides professional solution for representing and editing tabular data on the web. Carefully designed, with powerful script API, this editable DHTML grid is easy configurable with XML, and shows convincing results working with large amounts of data. jqGridView allows easy implementation of nice looking(managed through css). jqGridView is not platform-depending plug-in, it can be used with different web -programming platforms like: ASP .NET/ASP, PHP, JAVA, CGI scripts etc. jqGridView has hight bowser compatibility.

jQuery grid view plugin

jqGridView is new, client-rich, XML-based, ajax grid plugin for jQuery library. jqGridView provides professional solution for representing and editing tabular data on the web. Carefully designed, with powerful script API, this editable DHTML grid is easy configurable with XML, and shows convincing results working with large amounts of data. jqGridView allows easy implementation of nice looking(managed through css

view state vs request parameters


If  the view state is the data entered into the form fields then they are supposed to be available in the request parameters or request body. Then why would we need view state for?


Form view in ASP.NET


hi all...!
i have a database and i create a form with button edit,delete, New Registration..using Formview in asp.net..
everything was working good...

And i write SQL statement to get New ID number into dropdownlist/TextBox when i click button "New Registration".

i can get new(next) ID number after read database
it's also working good

Now i want change it to get ID which was deleted from table and replace the ID with new record...what i need is when i click "New Registration" i want get deleted "ID" first and then go to new record ID...

my code is here:-it working for get next ID after read database.

FROM Table1
AS boon WHERE PANG &gt;300000

partial view, 2 controllers



This is my first visit to the forums, I hope someone here can help me


I'm writing a small webapplication for creating repair tickets and adding comments, really basic

now I'm writing this in MVC2

So I have 2 controllers, 1 HomeController that does everything related to the tickets (listing tickets, creating new ones, editing) and 1 controller for the comments

the edit view for the homecontroller contains a partial view for /comment/create

so /home/edit/ticketnumber can edit the title and status of the ticket on the left side of the screen, the right side of the screen contains the partial view for adding comments

this is done like this:

Html.Renderaction("Create", "Comment");

but if I look at the generated html code when running the app, both save buttons go to /home/edit/ticketnumber

so the comment is never saved.


I hope this makes sense and that someone can help me solve this

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend