View Complete Post
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:
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
I finally got around to trying vs2010 and MVC 2 ... I'm glad I did not put them on a production computer.
My first compile (I have not had a chance to investigate because I just did this and I am too tired).
All I did was create a MVC 2 solution with MSTEST Unit Testing selected too.
I compiled it and get four unexpected errors (because I have heard ASP.NET MVC 2 "alpha" and vs2010 Beta 2 are supposed to be somewhat robust):
In both HomeController and AccountController:
"The type or namespace name "Controllers" does not exist ins the namespace "mvczzzzz001" occurs twice, once for HomeController.cs and once for AccountController.cs.
AccountControllerTest.cs has two errors: can not find "AccountController" namespace and can not find "IFormsAuthentication" namespace.
With ASP.NET MVC v1.0 there are errors when one uses xUnit.net (version at time of ASP.NET MVC v1.0 RTM) as the test framework but not errors with MSTEST (I prefer xUnit.net to MSTEST).
I am just so surprised to find such errors in vs2010 + MVC 2 ....
is this happening to anyone else?????????????????
Thank you ~~ regards, Gerry (Lowry)
I have some kind of strange problem. I use Visual Studio 2008 Standard Edition, and whenever I use ~ in links (like PostBackUrl = "~/Admin/AddProduct.aspx"), ÃÂ ~ is translated into "C:\DocumentAndSettings\User\Desktop" instead of my application root. Of course I dont have any project on Desktop. It happens in every project I run , even in project from pendrive which works properly on other computers.
How can i solve this problem ? What and where should i change ? I will be very thankful for any help.
I am just learning MVC, so bear with me.
I would like to have a project that contains all of my Controller logic. I'm not concerned with using Areas, as these are still maintained within the same project.
Consider this scenario:
I have multiple sites/apps that require the exact same interaction in regards to a particular area, say CRUD ops on a user account. I do not want to create all of the controller logic for one site/app, recreate it again for the next, and make sure that I keep all maintenance to each in sync. I would prefer to keep the controllers in a separate project and reference them from the appropriate site.
I know someone will say that the controller logic is a lot of times specific to the application (as I've read elsewhere), but let's just say that it is guaranteed to be the same. I want to focus on the "how" and not the "why".
So far, I've created a class library project with the appropriate references for accessing System.Web.Mvc. How do I proceed with the routing configuration for this? Is this idea even possible? I read a few older articles that were written when Areas were first being introduced that said to create separate projects for them. Is this idea similar to that?
Thanks for your time and noob tolerance.
If I make a list of data in a controller to pass to a view,
List<String> something = new List<String>;
ViewData["something"] = something;
Will this List stay in memory after the Controller returns the view? Should I do "something.Clear()" before returning the view in order to manage server memory?
I have an area named CMS on my MVC3 Preview 1 application.
Is it possible to have an error view inside the CMS area to display only errors that occurred on the controllers under the CMS area?
Basically I want the errors inside the area to be handled by a different controller than the errors on the "application root".
Does anyone have any novel workarounds for displaying geospatial path/line data in a report that exceeds a hemisphere in size. I would like to display path data for vehicles that traverse the globe in a geography map, i.e. satellite, plane or ship paths.
One idea is to break the line path into smaller segments based on a time box such as an hour/week or perhaps there's a way to present a point map layer in Report Builder as a connected line?
Any ideas/suggestions welcome.
Thanks in advance
Trying to integrate Expression Web project with Visual Studio .Net project, EW for design, VS for coding.
Master pages seem to be the approved model for 'consistent design' including nav bar etc., but a master
page in root with navbar containing relative path
when applied to a child page in
generates a composite path:
result: a href:[siteroot]/register/news/default.htm
vs intended result:
intended: a href:[siteroot]/news/default.htm
Rather defeats the object of master pages, if we can't use them 'down' the site tree, and manually building xml sitenode maps and using or coding providers seems overkill, especially since 'consistent look and feel' (including navigation) is precisely what master pages are already supposed to provide.
~/ application roots don't seem to work either (yet I used them profusely previously in custom controls for precisely this function) with web sites located under a server virtual directory
Bad enough needing ExpressionWeb dwt + master pages for a single site, but can't imagine relying on master pages (at all) until we get this basic functionality resolved. Trying hard to like Expression Web and MasterPages, and to learn to do things 'the proper way', but all th
I am working on a localization project, some of the localized text are in graphics, some of the example graphics paths:
My web forms use <asp:image> controls and <img> tags (runat = sever) to point to graphics in /en/images. I need to a function to loop through all image control and point them to different paths based on the locale set at runt time. Which event should I override and how do I write it?
All my web pages inherit from a base page, I don't know if that makes differences.