I notice Scott Guthrie is starting to mention Razor a fair bit on his blog but I'm just not that sure that it's a good fit for my style.
Granted it's a fairly unfamiliar style for someone who's pretty used to a "standard" sort of ASP.Net markup (content place holders and inline code), but it just feels like a lot of additional pages to ...
Hey fellow ASP.NET MVC devs,
I'm looking to buy ASP.NET MVC 2 in Action but I wanted to see if anyones read it and if they would recommend it/or another ASP.NET MVC book. I've already read NerdDinner and I really enjoyed it but am hoping to extend my knowledge and read something else.
The description seems quite promising but as they s...
Hi,
I have 2 div one to load data from an ajax request and another to display Jquery dialog with gif image which says loading.
The jquery dialog is displayed when the page is requested while the ajax function gets the data from the controller. I want to close the dialog when the ajax function completes the request but not sure hot to ...
I'll start off by saying my terminology might be off, which is why I might be having trouble finding an answer to this question, and apologising for the wall of text.
I have a strongly-typed view that inherits from a custom type called Record. Record has a dictionary of named fields of varying datatypes - some strings, some ints, some D...
I am using asp.net MVC2. i am facing a problem in state management of javascript contents.
i have got a image map in which on click on various part of image i am showing same page (redirect with parameters) with some parameter like : Secure/BodyWork?view=7
and on basis of value in parameter view i am showing various content on page. in t...
I have two submit buttons in one form. I want to call different actions in both buttons. Is there any way to accomplish this without using JavaScript.
...
I have a strong typed view model and a MetaData partial class which has annotation attributes on required fields and field type. The Create.aspx view page has a form when submitted will execute Create method in the controller. When the user submit the form without all the required fields entered, upon reaching UpdateModel() line an exce...
I want my url like this:
"http://domain.com/tag/高兴"
My route mapping:
routes.MapRoute("Tag", "tag/{name}", new { controller = "Tag", action="Index" });
But Html.RouteLink will encode the parameters as default. If I use Html.RouteLink in my View, the generated html is:
<a href="/tag/%E9%AB%98%E5%85%B4">高兴</a>
Is there any way to a...
I can not send data to MVC controller using YAHOO connect library.
Parameters query and filter are NULL. Where is the problem?
// --- JavaScript --- //
var callbacks = {
// Successful XHR response handler
success: function (o) {
var messages = [];
// Use the JSON Utility to parse the data...
I am using ASP.Net MVC and placed a jqgrid on my page. The data source for my jqgrid is a xml file. I have populated a datatable from source xml and then converted this datatable into JSonObject to fill my jqgrid. I know it can be done in better ways but for now I have to apply it this way only..
In the jqgrid, I have enabled editmode f...
I'm trying to do a hidden file upload to iframe and i'm stuck.
What seems to be not working is choosing a file.
When I unhide form controls and use them everything works fine.
If I use form controls to pick a file and then submit form via "send" link - it works fine.
When i use choose file link, I can see that file control filled up with...
Hi guys,
I'm running the nerddinner MVC application on visual studio, and the database is on sql server 2008. I was previously having problems with permissions, etc but I seemed to have these sorted.
I created a user - taraw in SQL Server Management Studio, and got this all working. I can log into it fine.
When I test the application...
Hello Guys, I developed an application in ASP.NET MVC. This app has an action that returns a JsonResult and I get it with jquery in client side. Everything works fine but I'd like to know, if is there any way to make a security in this action to return only requests that came from my website.
Is there any way to avoid others websites t...
I have an MVC Application that is performing client-side validation using Castle Validator which is enabled with this...
<%= Html.ClientSideValidation("formCreateUser", Model, "errorContainer")%>
I have one particular submit button on the form that I want to cause a postback without performing the client-side validation. How can I dis...
I want to call an action with something similar to this uri:
http://server/controller/action/?columns=firstname&columns=lastname&columns=age
and use it like this:
public ActionResult Action(string[] columns)
{
}
how do I do it?
...
I tried to simply new up a different controller and then calling the action method. The return value is of type ViewResult and the model was created, but the View is null. I guess the context in which the runtime tries to find the correct view is wrong.
How can I achieve this?
Background
Trying to see if a template controller can use ...
Hi,
I am using the new .NET 4 WCF REST web services. In order to link resources, I'd like to put links in my responses. In ASP.NET I can generate URLs from my routing configuration (e.g. UrlHelper.Action(...))
With WCF REST web services I have an ASP.NET routing configuration plus Uri templates:
[WebGet(UriTemplate = "{id}")]
MyResult ...
Has anyone successfully assigned a datepicker to a date field that is repeated in a grid?
Surely someone has done it before?
I find a problem with doing this is that the ID for each field in a row is repeated in the next row. So when I assign a date on the 4th row, I update the same field in the first row because their ID is the same.
...
I have a site running with ASP.NET MVC 1 and have encountered a bug where a bool in my model is being reset to default because the value is not used in the view.
The code for the Controller:
public ActionResult Edit(Guid id)
{
Service service = GetService(id);
if (service == null)
return View("NotFound");
return ...
The client will choose an item from a dropDown list, this newly selected value will then be used to find assets linked to that selected item, these assets will then be loaded into the listBox.
This sounds simple enough, and I'm aware I could use a partial View but it seems overkill for just updating one component on a form.
Any
...