MVC & RadioButtonList
I tried doing this but this only display the radiobutton without text beside it.. <% foreach (string s in Html.RadioButtonList("rbl")) {%> <% =s %> <% } %> ...
I tried doing this but this only display the radiobutton without text beside it.. <% foreach (string s in Html.RadioButtonList("rbl")) {%> <% =s %> <% } %> ...
Hi Folks, Strangest thing happened today with my ASP.NET MVC project. I built the installer project this afternoon, and all of a sudden, there were all these new dependencies! Yuck. Microsoft.SqlServer.BatchParser.dll Microsoft.SqlServer.ConnectionInfo.dll Microsoft.SqlServer.Dmf.dll Microsoft.SqlServer.Management.Sdk.Sfc.dll Microsof...
I only know a small amount about .NET MVC and haven't used it barely at all so far but I was wondering how would you create re-useable controls that can be spread across different applications? We have various controls that have been created in external libraries and we reference the assembly if we want to use them. An example would be ...
I test my app only on local cassini web server, and I get strange thing. One Index page works right in default manner, second shows 404, but when use full version Controller/Index - works normal. Only difference I found is that in first sample there is no slash in the end, and in second slash exists, but link that points on corrupted is...
The following code will generate a link to the page I want to get to. <%= Html.ActionLink(image.Title, image.Id.ToString(), "Image") %> The following code will cause the correct url to be rendered on the page. <%= Url.Action("Index", "Image", new { id = image.Id })%> But when I try to use it in javascript it fails. (with some stran...
I'm new to ASP.NET MVC and I'm trying to get the full url to a action when working in a view. I need this to submit to a third party API as a callback. For example what I need is http://myserver.com/controller/action When I use <%= Url.Action("action", "controller") %> I get /controller/action I know several ways to add ...
I have a view user control that can post form. This control can be used on multiple views. If user enters invalid data i add errors to ModelState - as simple as that. The problem is that i don't know which view/actionresult to return since i don't know from where user post form. Ok, i can get urlreferer - but that does not look nice fo...
I'm building a website in ASP.Net, using MVC, and need to list a set of results. Both of the following work as I want them to but I'm wondering which is faster, cleaner and/or better - or if another option entirely would be more appropriate? Note: ViewData.Model is of type IEnumerable<Thing> and I need to display more attributes than Na...
I'm having trouble with TryUpdateModel(). My form fields are named with a prefix but I am using - as my separator and not the default dot. <input type="text" id="Record-Title" name="Record-Title" /> When I try to update the model it does not get updated. If i change the name attribute to Record.Title it works perfectly but that is not...
I'm fairly new to ASP.NET MVC, and I'm having a little trouble with scripts... in particular, I want to use jQuery in most pages, so it makes sense to put it in the master page. However, if I do (from my ~/Views/Shared/Site.Master): <script src="../../Scripts/jquery-1.2.6.js" type="text/javascript"></script> Then that is literally wha...
How would I handle something like the below uri using ASP.NET MVC's routing capability: http://localhost/users/{username}/bookmarks/ - GET http://localhost/users/{username}/bookmark/{bookmarkid} - PUT Which lists the bookmarks for the user in {username}. Thanks ...
Why don't we get compile errors on inline code errors in asp.net mvc views f.eks <h1><%= ViewData.Model.Title.Tostrig() %></h1> The code above will build just fine. Wrong spelling in webform controls will give you an error so I can't see why this isn't supported in asp.net mvc EDIT: Luckily there seem to be a fix included in the firs...
Do I need a separate controller for the below? http://localhost/bookmarks --> bookmarks controller http://localhost/bookmark/{bookmarkid} --> bookmark controller Is there any way I can combine them both into one controller? I want to keep the uri's the same i.e. bookmark singular indicating fetch a single bookmark. Thanks ...
I was thinking that i wanted to gain some experience in the new asp.net mvc and some asp.net ajax. So i'd like to get some project suggestions that would suite for this! Would maybe be fun to create a little bigger project on codeplex, like the storefront project. ...
I know the use of server-side controls is a no-no in ASP.NET MVC, however we have a long list of crystal reports that the company has already produced for a previous application that I would like to utilize for our new ASP.NET MVC application. Is there an appropriate way to use crystal reports in ASP.NET MVC? If so, how? ...
Something like this might had worked <%= Html.RouteLink("", new { controller = "Article", action = "Details", id = A.ArticleID}, new { @class = "image-link" })%> Except it doesnt like an empty title. ...
can anyone think of a better way to do this? [AcceptVerbs(HttpVerbs.Post)] public ActionResult SaveAction() { NameValueDeserializer value = new NameValueDeserializer(); // selected messages MemberMessageSaveAction[] messages = (MemberMessageSaveAction[])value.Deserialize(Request.Form, "value", typeof(MemberMessageSaveAction[])...
I am trying to decide whether to learn ASP.NET MVC (or to spend the time learning another technology that interests me). I know that it is an elegant framework, but I am trying to assess my future job opportunities if I invest in this skill. In your estimation, how long is it going to be before demand for ASP.NET MVC developers rivals th...
With ASP.NET MVC, it is common to have AJAX code(e.g. jQuery) to invoke web service from server to without page refreshing. It's natural to make web service RESTful. It seems that there are two ways to go. First, the ASP.NET MVC URI's are RESTful, it is very easy to make some Controller/Action to act as web service method. Second, WCF ca...
Given the following classes and controller action method: public School { public Int32 ID { get; set; } publig String Name { get; set; } public Address Address { get; set; } } public class Address { public string Street1 { get; set; } public string City { get; set; } public String ZipCode { get; set; } public String State...