Search

You searched for the word(s): userid:620523

Matching Posts

  • Re: feature request: the ability to do "@someObject" instead of the tiring "ViewData("someObject")"

    Essentially what you want is for the framework to take variables from the controller class and inject them at runtime into your view class. (each view is an instance of ViewPage). That is not currently possible. Asp.net mvc is written in C#, which is a statically typed language. It doesn't allow you to inject member variables into a class at runtime. The 4.0 version of the .net framework will have support for dynamic typing, but even with that I don't know if you want is possible due to scoping
    Posted to ASP.NET MVC (Forum) by CodeHobo on 11/28/2009
  • Re: Ajax Upload with MVC

    Another option is to use a flash based upload component. Here's a simple tutorial that shows you to how to do it http://blog.codeville.net/2008/11/24/jquery-ajax-uploader-plugin-with-progress-bar/ Note(you don't have to actually do anything with the flash object, it's used internally by the javascript library, but you're only interacting with a Jquery library)
    Posted to ASP.NET MVC (Forum) by CodeHobo on 11/28/2009
  • Re: Using the create-view of my "Poll-model" to add data in the "poll-table" and the related "answers-table"

    How are you communicating with the database? If you're usig an ORM (like Linq to Sql , Entity Framework, etc) you can just set up a relationship between the Poll and Answers table. If you link it so that the Poll table contains the Primary key and Answers has the foreign key (pollId), then when you load a Poll object the ORM will automatically load all associated answers so then you can access then in code by doing something like this // poll.answers now is a collection of answers foreach(var
    Posted to ASP.NET MVC (Forum) by CodeHobo on 11/28/2009
  • Re: ASP.NET MVC DropdownList

    You have a few options to get this to work Option 1, pass supervisor Id as a querystring paratemeter .load("/Account/NewAccount/?supervisorId=" + supervisorId); Option 2 would to to simply change the name of the parameter in your NewAccount action method to Id (what the default route sends) public ActionResult NewAccount(string Id){ // Id is actually the supervisorId // This works with the default route } Option 3, configure the route table to include a custom route routes.MapRoute( "NewAccount"
    Posted to ASP.NET MVC (Forum) by CodeHobo on 11/28/2009
  • Re: ASP.NET MVC DropdownList

    No problem, glad it helped. Can you post the complete javascript block from the view? That error normally indicates that an operation is trying to be performed on an undefined object.
    Posted to ASP.NET MVC (Forum) by CodeHobo on 11/28/2009
  • Re: ASP.NET MVC DropdownList

    Is there any javascript in HRAddAccount? I'm not seeing the javascript usage of settings. where in the code do you reference "settings" ?
    Posted to ASP.NET MVC (Forum) by CodeHobo on 11/28/2009
  • Re: lose user uncommit data after server side validate

    I'm not sure If I understand, but are you saying that after the validation fails the form loads but none of the changed values are there? What does your view look like are you using input tags for textboxes of the HtmlHelper class (Html.TextBox()). If you are using just straight html then no, it won't repopulate, but if you're using the HtmlHelper method it should work fine. Also are you reloading member from a database before sending it to the view? Can you post the complete GET and
    Posted to ASP.NET MVC (Forum) by CodeHobo on 11/27/2009
  • Re: MVC or Web Forms?

    All the point mentioned before are really good so I'll just throw my 2 cents in. If you've done web development using CakePhp you shouldn't have any problem using asp.net mvc. Asp.net mvc uses the same model view controller pattern and gives you more control over your html. Web forms will more likely resemble the event driven programming model you did in VB6. It allows you to do things with drag and drop (like dragging UI elements) and add hooks to handle those. Personally I prefer asp
    Posted to ASP.NET MVC (Forum) by CodeHobo on 11/27/2009
  • Re: Asp.net MVC Benginner

    For learning about the mvc pattern itself, check out http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller As for learning about asp.net mvc: http://weblogs.asp.net/scottgu/archive/2007/10/14/asp-net-mvc-framework.aspx There are some great tutorials on this site http://www.asp.net/learn/mvc/ In particular look at this one as it helps you learn to build a simple asp.net mvc site http://www.asp.net/learn/mvc/tutorial-21-cs.aspx Also consider doing this introduction tutorial. It touches
    Posted to ASP.NET MVC (Forum) by CodeHobo on 11/27/2009
  • Re: display changed values in the View after POST.

    I think it has to do with the fact that the ViewData dictionary items (ViewData["Name"] and ViewData["Activity"]) have the exact same names as the HtmlHelper methods (ie Html.TextBox("Name"..). Try renaming the ViewData items to something else and see if that fixes it (don't forget to rename the initializations in the controller too). Also, Instead of using the view data to pass those elements, you might want to consider creating a class to hold this data and using
    Posted to ASP.NET MVC (Forum) by CodeHobo on 11/27/2009
Page 1 of 29 (286 items) 1 2 3 4 5 Next > ... Last »