Search

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

Matching Posts

  • Re: Custom ModelBinder and Release Candidate

    In my opinion, there shouldn't be any "Model Value", all the model value should explicitly come from the controller. When I wrote <%=Html.TextBox("Name") %>, I mean find the "Name" property/field from ViewPage.Model (or ViewData dictionary), and retrieve the value, and use it as the value for html input tag. Why the hell should I call SetModelValue after I modify the model object which will be passed to the View? Otherwise I have to keep track of every modification
    Posted to ASP.NET MVC (Forum) by deerchao on 2/2/2009
  • Re: Html.TextBox NullReference Validation rc1

    Maybe it was not approved yet.. Anyway, here it is: http://forums.asp.net/t/1378637.aspx
    Posted to ASP.NET MVC (Forum) by deerchao on 2/1/2009
  • Re: MVC.NET or LINQ

    Well, I hope that's always the case, but they keep releasing CTP, Beta, RC, RTM, SP to make me doubt myself :)
    Posted to ASP.NET MVC (Forum) by deerchao on 2/1/2009
  • Re: Html.TextBox NullReference Validation rc1

    I've met NullReferenceExceptions. After debugging (You can download asp.net mvc source code from http://www.codeplex.com/aspnet/Release/ProjectReleases.aspx?ReleaseId=22467 ), I found there is a bug which I've posted in another thread. You can try this: Modify HtmlHelper.cs, line 211: internal object GetModelStateValue(string key, Type destinationType) { ModelState modelState; if (ViewData.ModelState.TryGetValue(key, out modelState)) { //if appended by deerchao: if(modelState.Value!=null
    Posted to ASP.NET MVC (Forum) by deerchao on 2/1/2009
  • Two bugs or at least I think they are

    1, Say, I have an action like this: public ActionResult DoingSomethingThatNeedsValidation(Something s) { if(s.Name == "aaa") s.Name = "bbb"; return View(s); } And the View: <%= Html.TextBox("Name") %> The problem is that after the action, the UI still shows "aaa", but not "bbb"; Even if I wrote it like this: <%= Html.TextBox("Name", Model.Name) %> And here is my solution: InputExtensions.cs: private static string InputHelper
    Posted to ASP.NET MVC (Forum) by deerchao on 2/1/2009
    Filed under: bugs
  • Re: Could not load type... in strongly typed view

    Create a brand new Asp.net MVC Application, copy ~/Views/Web.config to override the one of your existing project. If it's still not working, do the same for ~/Web.config (and of course merge the changes you've made). I've met the problem because some of these places references the GAC version of System.Web.Mvc assembly, and my code references my custom build of the released source code.
    Posted to ASP.NET MVC (Forum) by deerchao on 2/1/2009
  • Re: How to prevent IE from adding "[1]" before char dot to the default file name of a "Save as" dialog?

    Sorry, I have to go to bed now. I'll test it tomorrow, but if it works for you, I think it will work for me. Thanks for your patience! -------------------- Update: it works, Thank you very much!
    Posted to Client Side Web Development (Forum) by deerchao on 10/14/2007
  • Re: Setting image URL for image component in Javascript

    Your imagepop is a server control , that means it only exists at the server, and the client/browser don't know anything about it. The browser only knows HTML tags generated by server controls, in this case, imagepop generates a <img> tag. For some reason, this <img> tag's id won't be the same as "imagepop", so the browser will fail to get element by Id "imagepop". To get the client id for a server control, so that the browser will know, you have to use
    Posted to Client Side Web Development (Forum) by deerchao on 10/14/2007
  • Re: Setting image URL for image component in Javascript

    Sorry, I've made two mistakes, try again: <script type="text/javascript"> document.getElementById('<% =imagepop.ClientID %>').src="file:///C:\\Fish.jpg"; </script> Note: you should include these 3 lines in you *.aspx file.
    Posted to Client Side Web Development (Forum) by deerchao on 10/14/2007
  • Re: How to prevent IE from adding "[1]" before char dot to the default file name of a "Save as" dialog?

    [quote user="mbanavige"] looks like you'll need to manually encode the periods instead of using the built in urlencode something like this: filename = filename.Replace( "." , "%2e" ); [/quote] It's still not working. FireFox showes %2e in file names without decode, IE don't even show a save as dialog, it display the stream content directly.
    Posted to Client Side Web Development (Forum) by deerchao on 10/14/2007
Page 1 of 4 (39 items) 1 2 3 4 Next >