I'm building a site using ASP.NET MVC with lots of jQuery and AJAX stuff, and I'd like the main menu to work with AJAX as more or less the rest of the site does.
In an ideal scenario, I would like my main menu to
1) load the main content with AJAX if the user has activated javascript
2) change the url in the address bar (to enable link...
Inside a form for adding a category I am rendering a control that contains a second form for adding a subcategory. The category form's action is category/add while the inner form's action is ../addSubcategory. My problem is that when submitting the inner form, my Add action is called.
So, my question is this: how can i make my inner for...
I have the following scenario:
I have an edit page, which can be called from different pages. These pages could be the detail view for the current entity, or the list view for the entities (with or without a search in the route).
HOW do I cleanly redirect to the original calling page using the MVC framework? Of course I could simply pa...
With the new "File" ActionResult, I was thinking about creating a controller to display certain images in my ASP.NET MVC app.
Something like:
<img src="/Photo/Show/hello" alt="Hello" title="Hello" />
versus:
<img src="/Photo/Folder/Hello.jpg" alt="Hello" title="Hello" />
I'm curious as to what the performance impact would be. Assu...
In response to an answer posted by Marc Gravell and his suggestion via email, I was wondering:
What choices do people make when deciding on their architecture for a new project?
This question could serve as a decent reference point for links/ideas/suggestions/architecture decisions, anything really that is of interest when deciding t...
I'm working on an ASP.NET MVC application and just getting to error handling. Help me solve the issue of getting the error message back to the user.
I have a controller:
[AcceptVerbs(HttpVerbs.Get)]
public ActionResult Show(string callNumber)
{
ServiceCallService sc = new ServiceCallService();
return View...
If you look at Stackoverflow.com's source you'll see the reference to their css file is:
<link href="/Content/all.min.css?v=2383" rel="stylesheet" type="text/css" />
How is this done so they can pass a version via query string and have the correct CSS file served up?
...
I am quite sure I've seen the answer to this question somewhere, but as I couldn't find it with a couple of searches on SO or google, I ask it again anyway...
In Entity Framework, the only way to delete a data object seems to be
MyEntityModel ent = new MyEntityModel();
ent.DeleteObject(theObjectToDelete);
ent.SaveChanges();
However,...
My website is an asp.net-mvc(beta1) website, fully validates and works in all browsers (except obviously in IE6 for this matter).
I can reproduce the error by doing the following:
Make a POST request with some parameters
From the results click one of the generated GET links
Pressing the "BACK" button from the resulted page.
Sometime...
I'm working on an asp.net-mvc application. The linq data context is being passed into my service objects by structure map. I've got is set to have a scope of hybrid. This all works just fine.
protected override void configure()
{
ForRequestedType<AetherDataContext>()
.TheDefaultIs(() => new AetherDataContext())
.CacheBy(Instan...
hi,
i have a label in my form, and im trying to get the value of the label using HttpContext.Current.Request. But the label is not int he key, only the input types.
is there any way of retrieving the value of a label?
Hello
Request["lbl1"] doesnt work.
...
Hi, I have looked around on the Internet trying to answer this question. It seems to be kind of complicated though! Seems to come up with all sorts of different topics such as the HtmlHelper and other stuff.
Basically. How can you use custom controls with MVC? In a way that avoids doing anything that is frowned upon.
Also, Is it true t...
Over the past year I have heard alot about Velocity and NVelocity. Reading their documentation and doing searches on the net hasn't given me the answers I was looking for.
In what situation would I use this library in my development? What problem does it solve that didn't already have a solution?
...
I have a HTML form, and I have a Controller Action that accepts the POST request. Everything works with a regular submit button, but I would like to submit the form with a link (<a>-tag) instead, to be able to further control the formatting. Is there any way of doing this nicely built into the ASP.NET MVC Framework, or should I write my ...
I've tried installing RC1 must have been 5 times already and always run into the same issue around the "Configuring Templates' step. I've tried everything I can think of but now I have neither RC1 or Beta. Has anyone run into this error? Any suggestions for what I can do?
Screenshot of my problem here (not sure why I can't place it a...
I am posting a very simple form using a method I have used frequently in the past. It may be easier to show my code rather than type a lengthy explanation. Here's the HTML:
<% Html.BeginForm("CreateMarketingType", "ListMaintenance"); %>
<div id="ListMaintenanceContainer">
<table>
<tr>
<th>Marketin...
k... Strager was able to help me a bit. However, it's still not working quite right. Need someone that knows both MVC and jQuery please...
I have a page that has a image that when clicked on will launch a dialog box that gives the ability to upload a file. Once the dialog closes the image is supposed to refresh with what was uploaded/st...
Hello,
I want to display a list of images and a description on a webpage using ASP.net MVC. The images are stored in a SQL Server DB and i'm getting them back as a byte[].
However, I don't understand how I can display a series of images on a page. I want to do something like this:
<% foreach(Product p in Model.Products)
Response...
Simple enough, it would seem, but it turns out not to be - mainly due to the fact that the View can't possibly know which way through Model and Controller you got there. Regardless, it is a problem that needs a solution:
I have a login link, that takes the user to a form to enter username and password. When the user clicks "submit", I w...
In a visual studio 2008 project, how can one structure his controllers to accessible in the following directive?
http://localhost/MyWebsite/api/users/get/1
Both /api/ and /users/ are controllers "get" being a method of "users" with 1 as the parameter
Essentially I am talking about achieving REST i would assume.
Any ideas?
Thanks,
Ni...