Hi all,
I'm using a pagination method for displaying search results returned from my database.
I'm creating an Html.ActionLink for each extra page, and what I'm wondering is, how do you put the string that was searched into the ActionLink? Below is part of my partial view that I'm populating a div with. It comes after the results so the...
Hi,
I'm currently developping a web site with asp.net that use Lucene.Net to perform fulltext queries.
The web site display a couple of data lists.
The problem is that i perform fulltext queries FOR EACH items displayed in the list which can be a performance issue.
So i wonder if i should "pre fulltext query" with a kind of Search En...
Should i consider using ASP.NET Caching to cache query results on top of NHibernate 2nd Level Caching to improve performances ?
...
I have an ASP.NET MVC application with quite a few drop-down lists and multi-select lists. Essentially, a lot of lists of options.
My question is; is it better to pass these lists to the view as part of the Model, or as ViewData?
I am currently passing them as ViewData as I don't really need them on the model and they seem potentially ...
I have a table with text box asking for Name and Address for reference. If need be, I would like the user to have the ability to add more and not be restricted to just one. How would I add a new table to a form by clicking on my "getMore" button?
<table style="width:50%;">
<tr>
<th colspan="2">Reference</th...
Account Page opens like normal:
public ActionResult Index()
{
return View();
}
this goes to render the following View template: (because at this point there is no CurrentUser, 'user' is null, so it runs Html.RenderAction("LogOn", "Account");)
<% var user = (WAPConfigUser) HttpContext.Current.Session["...
I have a strange effect on my site when it is under heavy load.
I randomly get the properties of other users settings. I have my own implementation of the profile system so I guess I can not blame the profile system itself.
I just need a point to start debugging from. I guess there is a cookie-value that maps to an Profile entry somewh...
Hi!
i´m using LINQ with the subsonic in a class to get my data here is the code below:
public IQueryable<Veiculo> SelecionaVeiculosSite()
{
return (from v in _db.Veiculos
where v.Ativo == true &&
v.Marca.Ativo == true &&
v.M...
I am trying to find some examples of building a custom model binder for a unique binding scenario I need to handle, but all of the articles I found were for older versions of MVC which are no longer relevant in MVC2. I've been referencing the DefaultModelBinder source code to try to get a general feel for what I need to do, but it's enti...
I am using a server control on a single web.forms page. I have to use this control on a web.forms page since its a server control, although this is actually a MVC project. So I created a web.forms folder and put my new page in it. I then copy the example code from the signature control. I get the following error:
The base class includes...
I'm loading a partial view with an AJAX call:
public ActionResult LoadServerForm()
{
//data stuff
ViewData["ApplicationID"] = appID.ToString();
ViewData["Servers"] = ServersList(appServerRep.Session, null, appServers);
return PartialView("Application_AddServer");
}
This ...
I am trying to use Autofac and Autofac.Integrations.Web to register ASP.NET MVC controllers. I am currently using assembly scanning to find the controllers but one of them needs a special parameter that I would prefer to pass in instead. Found below are the registrations I have tried.
var builder = new ContainerBuilder();
builder.Regis...
I work in a VB.Net environment and have recently been tasked with creating an MVC environment to use as a base to work from. I decided to convert the latest SharpArchitecture release (Q3 2009) into VB, which on the whole has gone fine after a bit of hair pulling. I came across a problem with Castle Windsor where my custom repository inte...
Hi Guys
I'm trying to do an asynchronous login. When the user is authenticated I want to redirect to the user's originally requested page. The problem is that the Action Method is returning a Redirect type of ActionResult and the jQuery doesn't seem to know what to do..
I'm using the following jQuery:
$("form").submit(function(event)
...
Environment:
Win 7x64, VS 2010 RC, Resharper 5 beta, MVC2 RC, git
When I reboot my machine, my website, configured in IIS, seems to be fine. As soon as I load VS, and try and debug from it, the site becomes completely unresponsive. I can't even get it to serve images. I have the website in IIS pointed directly to the folder with my w...
I have a large existing application built on ASP.NET MVC2 RC2.
All of my links look like this: htp//site/controller/action/id
I just added an Area called: BigBird.
Now when I'm in the BigBird area, all of my links look like this: htp://site/BigBird/controller/action/id
Problem is that none of those controllers/actions exist in my n...
I would like to use DataAnnotations in my ASP.NET MVC application. I have strongly typed resources class and would like to define in my view models:
[DisplayName(CTRes.UserName)]
string Username;
CTRes is my resource, automatically generated class. Above definition is not allowed. Are there any other solutions?
...
Hi,
I am starting out on a new project (well, restarting an existing one), and trying to adopt TDD (for the nth time) for all the benefits that it should bring.
I believe that TDD will result in my tests driving me to write only the code that I need to write, but it will drive me to write the code that I NEED and not leave some out.
T...
basically, im calling Html.TextAreaFor to display a form, which is great/not a problem...
people enter text in it, and it gets submitted, and if it is successful, i want to return an empty Html.TextAreaFor... but after it's submitted, in the action method i am clear to set the Comment that people are making in the TextArea to an empty s...
I want to build and maintain a table of users. All users that access the ASP.NET MVC site are authenticated via Windows Authentication so they're bound to have a unique username. I'm grabbing the user name from:
System.Web.HttpContext.Current.User.Identity.Name
I feel like I could go two ways with this.
Anytime the user table o...