Let me start of by saying that I am inexperienced with JavaScript.
Here is what I want to do. When the user clicks "Show Details" on a row of data, they get a pop-up (modal?) window that has some data generated from another action within the MVC application. Where can I find an example of implementing something like this?
Also, when a...
Hi.
Im working on Asp.NET MVC 2 project with EF 4(POCO, Lazy disabled) and have a problem with DynamicProxies generated by EF runtime.
I have strongly typed partial view for EF POCO class ie Property, but from EF context i get Property object wrapped by Dynamic Proxy Class, so after calling RenderPartial i get this error:
The model it...
Hi, I've been reading stackoverflow for a few years now, but this is the first time I really need to post a question as I can't seem to find a suitable answer anywhere.
The thing is, I want to pass an object (a LinqToSQL entity to be precise) to my View, allow the user to add some properties, and then post it back to save it.
My object...
Hi
What are the advantages of passing a blank object eg Client from the controller?
public ActionResult Create()
{
Client client = new Client();
return View(client);
}
//
// POST: /Client/Create
[HttpPost]
public ActionResult Create(Client clientToAdd)
{
...
Hi Everyone,
I've been working on an ASP.NET MVC 2 (.NET 4.0, Visual Studio 2010) application for a while and have decided that I would like to deploy it as an Azure application.
After installing the latest (June 2010) Azure tools (through Visual Studio itself) I've added a blank CloudService to my solution. Whenever I try to add a "We...
I have an MVC view with the following jquery.
<script type="text/javascript" language="javascript">
$(document).ready(function () {
$('#myinput).change(function () {
alert('Changed');
});
});
</script>
When I change the text in the 'myinput' box, I want the alert 'Changed' to be displayed. This wor...
I want to enable caching for all Anonymous users of my site. But for logged in users of certain roles, I want to disable caching. I am using .net4/ASP.Net MVC2. How do I achive this?
...
I have the following code in my Global.aspx
protected override void OnApplicationStarted()
{
AreaRegistration.RegisterAllAreas();
RegisterRoutes(RouteTable.Routes);
RegisterAllControllersIn(Assembly.GetExecutingAssembly());
}
protected override IKernel CreateKernel()
{
return new StandardKernel(new ServiceModule());
}
...
I have a page with a search bar, facets, and a list of results. I'm trying to figure out how, if the user enters a search or selects a facet (drill down list like categories), to refresh the list of results and facets.
I've messed around with templating, such as John Resig's Micro-Templating (which is very cool), but it doesn't allow m...
[Required]
[DisplayName("my date")]
public DateTime? DateReg { get; set; }
so if the user is going to pass in an invalid datetime value he will get this message
"The value '02.07.201022' is not valid for my date."
how can I translate/localize this message ?
...
I have an Index page. In the contentwrap div the overlay is rendered and popuped by jQuery. The gridcontainer shall be updated via ajax.
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<h2>
List of Employees</h2>
<br />
<div id="gridcontainer">
<% Html.Ren...
I have the following ValidationAttribute class
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = true)]
public sealed class DateValidationAttribute : ValidationAttribute
{
public DateValidationAttribute(string leftDateProperty, CompareOperator compareOperator, string rightDateProperty, string errorMessage)
...
I really want to run my test websites from an iPad to show to clients but I don't want to have to rely on the 3g connectivity or wifi. Can I run sites that are compiled from an App or something similar on the iPad?
I have seen Mono Touch but I wanted first hand views on this as if I can I'm going to buy an iPad ASAP.
...
I'm using ASP.NET MVC 2.0 and C#. I've done this before by rolling my own solution using the database, but I was wondering if there's an easier way or an established practice for doing this. I'm also hoping the solution I choose makes it easy to support multiple languages later.
...
Hey,
I have this MVC form with 2 dropdownlist where selection on the first dropdown should update the second one through an AJAX call.
Form looks as follows:
<%using (Ajax.BeginForm("GetChildren", "Home", null, new AjaxOptions { UpdateTargetId = "result" }, new Dictionary<string, object> { { "id", "someForm" } }))
{ %>
<%= Html.DropDo...
Hello
I have this function:
public static string RenderViewToString(string controlName, object viewData) {
ViewDataDictionary vd = new ViewDataDictionary(viewData);
ViewPage vp = new ViewPage { ViewData = vd };
Control control = vp.LoadControl(controlName);
vp.Controls.Add(control);
StringBuilder sb = new StringBu...
I have a UserControl in MVC which may be repeated many times on the page.
Say I had something like the following:
<div>
<a href="#" class="enableTextBox">edit</a>"
<input type="text" class="comments" readonly="readonly" />
</div>
<div>
<a href="#" class="enableTextBox">edit</a>"
<input type="text" class="comments" rea...
Hey there StackOverflow,
I'm having problems deploying my website to the live server using VWD 2010 Express. I had done this without a problem in VWD 2008 Express. But, it seems that the tools for publishing a site are very different from 2008 to 2010.
What I've tried so far is to go to
Project>Package/Publish Settings and I change ...
I have a number of web applications within my website in IIS 7.5, in which my MVC2 web application will live.
WebSite
* Prod
* Test1
* Test2
I have firewall routing configured to redirect from http://test1.mywebsite.com/xxx to http://my.actual.website/Test1
I've used Url.Content("~/Content/Site.css") but the CSS is not ge...
Initial Warning: Long post and I might have got the pattern totally wrong anyway:
Given the following class which is the start of the Customer Aggregate:
public class Customer : KeyedObject
{
public Customer(int customerId)
{
_customerRepository.Load(this);
}
private ICustomerRepository _customerRepository = IoC.Res...