In my table i have: id, header, centent and foto columns. In foto column are cells included string values for egxample :(foto1.jpg,foto2.jpg). J split this and the result input to table. I'm trying to view this in Details.aspx. I must view one record from table in my database plus one split cell as links. View the hole record is not the ...
I have a slightly modified AccountController that should write a row into a table upon login.
However, the page redirects before the DB action has completed and so nothing is inserted.
I've temporarily solved this by sticking in a Thread.Sleep, but I'm looking for an alternative that makes it appear seamless.
If Not String.IsNullO...
if i have a div or a partialcontrol and i have link that i want to click that will refresh the div, it seems like i can:
use ajax.beginform or ajax.actionlink and return PartialResult()
use jquery to post/get/ajax and return json
if i have a big complex object that i am binding to my view, which option is better. it seems like for #...
In my controller, I current set a constraint that has the following regex:
@"\w+"
I want to also allow for underscore,dash and period.
THe more effecient the better since this is called allot.
any tips?
...
Can someone post a sample code on how I can access the TempData dictionary object from within the Global.asax.cs.
Thanks in advanced...
...
Hi,
After building my application in ASP.NET MVC and MS sql server, I would now like to display some statistics regarding my data.
What would be the easiest way to create HTML reports which are built of data crossing several tables? (Once the fields are picked they'll be static, meanning a single view is required)
I though their ough...
Hi,
I have been working with entity framework and ASP MVC for a while. I have stored the entity object in the HttpContext.Current.Session in order to use the same session at all times. Now I have encountered some problems and I am wondering if this may have been a bad idea and if so, how should I do it otherwise.
The problem I have now...
There are implementations for history.back in Micrososft AJAX and jQuery (http://www.asual.com/jquery/address/).
I already have jQuery and asp.net ajax included in my project but I am not sure which implementation of history.back is better.
Better for me is:
Already used by some large projects
Wide browser support
Easy to implement
Li...
Compiler Error Message: CS1002: ; expected
Source Error:
Line 56: </div><!--end #Asset-->
Line 57:
Line 58: <% KODmvc.Models.AssetRatingViewModel ratingModel = ViewData["RatingViewModel"] as KODmvc.Models.AssetRatingViewModel(); %>
Line 59: <% Html.RenderPartial("RatingView", ratingModel); %>
Line 60:
Source Fil...
If I have a route:
routes.MapRoute(
"RouteName", // route name
"{action}", // url with parameters
new { controller = "Home", action = "Index", id = "" } // parameter defaults
);
I want to be able to catch URL's of the form:
http://site...
Hi,
I am planning a new portal solution in ASP.NET MVC. I need to be able to have some parts of the site visible for everyone (public part) and a part where only registered users are allowed to visit. In traditional Web Forms the security was made on folder level, but how about ASP.NET MVC? Could someone please explain me how to do this ...
We're looking at the ASP.NET MVC 2 beta RenderAction() method. We like it very much but it seems that we can't use async controllers with it. Does anyone have an example of a "controller" that can figure out all the actions that will be called, cache the data, then let the called actions know that their data already exists vs. having ...
I have been adding error and business validation to my app, and when I test using a view that was strongly typed to one model, let's say locations, I get the validation summary as well as the validation messages for each field that didn't pass, plus my css highlights the appropriate field as expected...
...when I try this with a view th...
is there a way to test routes via nunit?
...
when unit testing a asp.net controller, don't you have to somehow mock the httpcontextbase?
All my controllers inherit from a custom controller class that I wrote (it just adds some common properties to the original controller class).
So its like:
public class MyController : Controller
{
protected override void OnActionExecuting(Sy...
I am an experienced ASP.NET WebForm developer and trying to learn MVC. I am still not too excited about MVC because of the inline code process. At some point I can't see the HTML from all the code and I have to render the page and do a view source.
I know you can swap out the view engine and was wondering about two things:
1- Is there...
Is there a good full sample application which highlights the new features of ASP.NET MVC v2 (as opposed to the initial release of ASP.NET MVC)?
...
Possible Duplicates:
Good asp.net mvc (VB) books
Best ASP.NET MVC book?
Best resources & books for ASP.NET MVC Framework
...
Hello,
I have ASP.NET MVC 1.0 application (.NET 3.5) running on II7 and Windows 2008 Server.
The application is deployed in 'Integrated Pipeline' mode.
In Global.asax.cs I added:
public void Application_EndRequest(Object sender, EventArgs e) {
//print URL
}
The method is being called even for static content (images,css,js) in /Conte...
Ok, let's say your view has four partials (each with seperate viewmodels) that are all tied to the main viewmodel. You hit submit and all your data posts up. You run some server side validation and you notice that validation errors occured in fields in 3 of the 4 partials. So, I want to post back the validation errors but above the pa...