Search

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

Matching Posts

  • Show/Hide Partial View

    Hello, I have a button on my master page to show the contact form. I would like to click on that button and show the contact form on top of everything else. Is it possible to, when the button is clicked, to render the form partial view on top of all other content? I am not sure if I will always have the form on every view and when the button is clicked I just used JQuery to show the form ... Or if when I click the button the partial view is requested and show on top of every content. Thank You, Miguel
    Posted to ASP.NET MVC (Forum) by shapper on 12/11/2009
  • Submit form without refresh

    Hello, I need to have a form on every view of a web site to subscribe and unscubscribe a newsletter. I created a partial view and three actions: Subscribe (GET) - Returns the form. Subscribe (POST) - Adds email to database. Unsubscribe (POST) - Removes email from database. My problem is how to have the two buttons subscribe and unsubscribe in the form to link to the two actions and to be able to submit the form without refreshing the page. How should I do this? If you think I should change the actions
    Posted to ASP.NET MVC (Forum) by shapper on 12/11/2009
  • Re: Show/Hide Partial View

    I was checking this one: http://www.ericmmartin.com/projects/simplemodal/ And the code where it uses an IFrame: // Display an external page using an iframe var src = "http://flickr.com/ericmmartin"; $.modal('<iframe src="' + src + '" height="450" width="830" style="border:0">', { closeHTML:"", containerCss:{ backgroundColor:"#fff", borderColor:"#0063dc", height:450, padding:0, width:830 }, overlayClose
    Posted to ASP.NET MVC (Forum) by shapper on 12/11/2009
  • Base Model. How could I do this?

    Hello, I have a BaseModel defined as follows: public class BaseModel { public GoogleAnalytics Analytics { get; set; } public PageHead Head { get; set; } public ViewModel Model { get; set; } } // BaseModel I am defining this model on BaseController. All controller inherit BaseController. Then on each action I would like to define the ViewModel Model. Like in one view Model would be ArticleCreate. On another Model would be DocumentEdit, etc. Is is possible to create an ArticleCreate, DocumentEdit,
    Posted to ASP.NET MVC (Forum) by shapper on 12/10/2009
  • RenderAction and RenderPartial Performance

    Hello, I am using Render.Action to render a menu on a view. The reason is that some of the menu items need values from the database so in the Menu action I get those values. I use render actions in other cases like in the Html head and Google Analytics. In some projects the menu does not need to access the database to be created ... Should I use a Render Partial? Is there a huge difference in performance between a Render Partial and a Render Action (Considering the Action only does return View();
    Posted to ASP.NET MVC (Forum) by shapper on 12/9/2009
  • Re: RenderAction and RenderPartial Performance

    Is there a maximum advisable number of Render Actions for one view? And is there a way to measure the difference of performance between using a RenderPartial and RenderAction. I tried to check some differences of the loading time with firebug but didn't see a lot of them ... Would you suggest to pass all values in a single base model with Render Partial instead using different RenderActions with one model each? Thank You, Miguel
    Posted to ASP.NET MVC (Forum) by shapper on 12/9/2009
  • Controller Attribute, Localization and Route.

    Hello, I am following this article to create a multi language web site: http://helios.ca/2009/05/27/aspnet-mvc-and-localization/ There are two things that I am not sure how to implement: 1. How to add a parameter to a controller attribute? Basically I want to define on the attribute the name of the Localization Cookie: public class SetCultureAttribute : FilterAttribute, IActionFilter { public void OnActionExecuting(ActionExecutingContext filterContext) { string cultureCode = SetCurrentLanguage(filterContext
    Posted to ASP.NET MVC (Forum) by shapper on 12/8/2009
  • Re: Controller Attribute, Localization and Route.

    I changed the original Culture Attribute to be able to use it as follows: [Culture(CookieName = "Culture", Cultures = "pt-PT, en-US", DefaultCulture = "pt-PT")] public ActionResult Index(Int32? page) { // ... } But the problem is that I have two kind of actions: 1. The ones where the content displayed is localized and I use the Culture attribute to define the culture. I don't understand how to route "{language}/{controller}/{action}/{id}" gets the language
    Posted to ASP.NET MVC (Forum) by shapper on 12/8/2009
  • Set Attribute Property from Web.Config not working. Is there a way to make this work?

    Hello, I am using a controller attribute as follows: [ElmahHandleError, Culture(CookieName = Setup.Settings.CultureCookieName)] public class BaseController : Controller { } // BaseController I get an error on Culture attribute saying: An attribute argument must be a constant expression, typeof expression or array creation expression of an attribute parameter type Setup is a Configuration class that I created for web config. So basically when I have Setup.Settings.CultureCookieName I am getting the
    Posted to ASP.NET MVC (Forum) by shapper on 12/8/2009
Page 1 of 294 (2935 items) 1 2 3 4 5 Next > ... Last »