Search Results

Search found 62 results on 3 pages for 'misko mare'.

Page 1/3 | 1 2 3  | Next Page >

  • OOP for unit testing : The good, the bad and the ugly

    - by Jeff
    I have recently read Miško Hevery's pdf guide to writing testable code in which its stated that you should limit your classes instanciations in your constructors. I understand that its what you should do because it allow you to easily mock you objects that are send as parameters to your class. But when it comes to writing actual code, i often end up with things like that (exemple is in PHP using Zend Framework but I think it's self explanatory) : class Some_class { private $_data; private $_options; private $_locale; public function __construct($data, $options = null) { $this->_data = $data; if ($options != null) { $this->_options = $options; } $this->_init(); } private function _init() { if(isset($this->_options['locale'])) { $locale = $this->_options['locale']; if ($locale instanceof Zend_Locale) { $this->_locale = $locale; } elseif (Zend_Locale::isLocale($locale)) { $this->_locale = new Zend_Locale($locale); } else { $this->_locale = new Zend_Locale(); } } } } Acording to my understanding of Miško Hevery's guide, i shouldn't instanciate the Zend_Local in my class but push it through the constructor (Which can be done through the options array in my example). I am wondering what would be the best practice to get the most flexibility for unittesing this code and aswell, if I want to move away from Zend Framework. Thanks in advance

    Read the article

  • How to keep my topmost window on top?

    - by Misko Mare
    I will first explain why I need it, because I anticipate that the first response will be "Why do you need it?". I want to detect when the mouse cursor is on an edge of the screen and I don't want to use hooks. Hence, I created one pixel wide TOPMOST invisible window. I am using C++ on Win XP, so when the window is created (CreateWindowEx(WS_EX_TOPMOST | WS_EX_TRANSPARENT ...) everything works fine. Unfortunately, if a user moves another topmost window, for example the taskbar over my window, I don't get mouse movements. I tried to solve this similarly to approaches suggested in: How To Keep an MDI Window Always on Top I tried to check for Z-order of my topmost window in WM_WINDOWPOSCHANGED first with case WM_WINDOWPOSCHANGED : WINDOWPOS* pWP = (WINDOWPOS*)lParam; yet pWP-hwnd points to my window and pWP-hwndInsertAfter is 0, which should mean that my window is on the top of the Z, even though it is covered with the taskbar. Then I tried: case WM_WINDOWPOSCHANGED : HWND topWndHndl = GetNextWindow(myHandle, GW_HWNDPREV) GetWindowText(topWndHndl, pszMem, cTxtLen + 1); and I'll always get that the "Default IME" window is on top of my window. Even if try to bring my window to the top with SetWindowPos() or BringWindowToTop (), "Default IME" stays on the top. I don't know what is "Default IME" and how to detect if the taskbar is on top of my window. So my question is: How to detect that my topmost window is not the top topmost window anymore and how to keep it on the top? P.S. I know that a "brute force" approach of periodically bringing my window to the top works, yet is ugly and could have some unwanted inference with the notification window for example. (Bringing my window to the top will hide the notification window.) Thank you on your time and suggestions!

    Read the article

  • When you should and should not use the 'new' keyword?

    - by skizeey
    I watched a Google Tech Talk presentation on Unit Testing, given by Misko Hevery, and he said to avoid using the new keyword in business logic code. I wrote a program, and I did end up using the new keyword here and there, but they were mostly for instantiating objects that hold data (ie, they didn't have any functions or methods). I'm wondering, did I do something wrong when I used the new keyword for my program. And where can we break that 'rule'?

    Read the article

  • WIFI connection stopped working on Windows - how to troubleshoot

    - by Michiel de Mare
    Friends and family often come to me with this problem, and while I usually manage to fix their problems eventually, it often take me several hours. I'm sure there are many of us in the same position. Also, friends rarely seem to know which provider they're using, or what the password is of their WIFI-connection or ADSL-router. I'd like to gather that information myself. I'd like to have a checklist to diagnose and fix the problem, and a set of utilities on an usb-stick to help me. Where to start?

    Read the article

  • Piratage d'Adobe : la liste aberrante des mots de passe des utilisateurs, plus de 1,9 million de comptes utilisent « 123456 » comme mot de passe

    Piratage d'Adobe : la liste aberrante des mots de passe des utilisateurs plus de 1,9 million de comptes utilisent « 123456 » comme mot de passe En fin du mois dernier, Adobe confirmait avoir subi une cyberattaque d'envergure, ayant entrainé le vol du code source de ses applications Photoshop, Adobe Acrobat, ColdFusion, et la compromission de 38 millions de comptes utilisateurs.Un nouveau rapport vient de jeter un autre pavé dans la mare. L'éditeur ne respecterait pas les meilleures pratiques en...

    Read the article

  • Glume amuzante cu copii

    - by interesante
    Tatal chel; o fetita o intreaba pe mama sa: - Mama, de ce tata e asa de chel? - Deoarece are multa minte si i-a cazut parul. - Dar tu de ce ai asa de mult par in cap? - Mananca si taci!Era odata un tanar care cand era mic vroia sa se faca un "mare" scriitor. Cand i s-a cerut sa defineasca "mare" a spus: "Vreau sa scriu chestii pe care sa le citeasca toata lumea, chestii la care lumea sa reactioneze emotional, lucruri care sa-i faca sa strige, sa planga, sa urle, sa se zbata de durere, disperare si manie!" Acum lucreaza pentru Microsoft si scrie mesaje de eroare...Mai multa distractie pe un website cu jocuri flash care sa te captiveze.Un barbat zbura cu un balon cu aer cald si la un moment dat si-a dat seama ca s-a ratacit. A coborat pana aproape de pamant si a zarit o femeie pe o pajiste. Apropiindu-se de ea, el i-a strigat: -Fii amabila, poti sa ma ajuti? Am promis unui prieten ca ma intalnesc cu el, dar nu mai stiu unde ma aflu. Femeia i-a raspuns: -Te afli intr-un balon cu aer cald, la vreo 10 metri inaltime. Te gasesti intre 40 si 41 grade latitudine nord, si intre 59 si 60 de grade logitudine vest. -Ei, probabil esti inginera de profesie! spuse omul din balon. -Asa este, raspunse femeia, dar de unde stii? -Pai tot ce mi-ai spus este corect din punct de vedere tehnic, dar tot n-am idee ce-as putea face cu informatiile de la tine si sunt tot in ceata. Sa fiu sincer, nu m-ai ajutat deloc. Ba chiar pot spune ca m-ai tinut pe loc degeaba. Atunci femeia i-a raspuns: -Dar tu trebuie sa fii director! -Asa este, raspunse barbatul, dar de unde stii? -Pai nu stii unde te afli si nici incotro te indrepti. Te-ai ridicat la inaltime profitand de o flama care a incins situatia. Ai facut o promisiune pe care nu stii cum ai sa ti-o tii si te astepti ca oamenii de sub tine sa-ti rezolve problema. Adevarul este ca te afli exact in locul unde te aflai cand am inceput discutia, acum 1 minut, dar brusc constati acum ca asta este din vina mea.

    Read the article

  • Seriously, what's the deal with InheritInChildApplications? Does this work for anyone??

    - by mare
    I've tried wrapping my <system.web> with <location path="." InheritInChildApplications="false"> like this <location path="." InheritInChildApplications="false"> <system.web>...</system.web> </location> But VS 2010 Web Developer Express keeps saying "The 'InheritInChildApplications' attribute is not allowed" and when I run my web app there's an error: "HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid." Config Error Unrecognized attribute 'InheritInChildApplications'. I've seen some smartguys all over the Internet discussing this and how it is working for them but there's much larger number of people here at SO and other places that did not get this to work. My configuration: ASP.NET 4.0 RTM, VS 2010, IIS 7.5

    Read the article

  • POST from edit/create partial views loaded into Twitter Bootstrap modal

    - by mare
    I'm struggling with AJAX POST from the form that was loaded into Twitter Bootstrap modal dialog. Partial view form goes like this: @using (Html.BeginForm()) { // fields // ... // submit <input type="submit" value="@ButtonsRes.button_save" /> } Now this is being used in non AJAX editing with classic postbacks. Is it possible to use the same partial for AJAX functionality? Or should I abstract away the inputs into it's own partial view? Like this: @using (Ajax.BeginForm()) { @Html.Partial("~/Views/Shared/ImageEditInputs.cshtml") // but what to do with this one then? <input type="submit" value="@ButtonsRes.button_save" /> } I know how to load this into Bootstrap modal but few changes should be done on the fly: the buttons in Bootstrap modal should be placed in a special container (the modal footer), the AJAX POST should be done when clicking Save which would first, validate the form and keep the modal opened if not valid (display the errors of course) second, post and close the modal if everything went fine in the view that opened the modal, display some feedback information at the top that save was succesful. I'm mostly struggling where to put what JS code. So far I have this within the List view, which wires up the modals: $(document).ready(function () { $('.openModalDialog').click(function (event) { event.preventDefault(); var url = $(this).attr('href'); $.get(url, function (data) { $('#modalContent').html(data); $('#modal').modal('show'); }); }); }); The above code, however, doesn't take into the account the special Bootstrap modal content placeholder (header, content, footer). Is it possible to achieve what I want without having multiple partial views with the same inputs but different @using and without having to do hacks with moving the Submit button around?

    Read the article

  • Spark VS 2010 intellisense

    - by mare
    I was thinking about switching one of my projects (and after that subsequently other projects too) to Spark View Engine but after todays research I ran into problem of a lack of Intellisense for Visual studio 2010. Not only that but it seems that the project is not maintained regularly. So I'm left with a feeling that I should not choose Spark at this time yet. However, apparently NHaml has the same "issues" too. I know it is discussed in more detail here http://stackoverflow.com/questions/1451319/asp-net-mvc-view-engine-comparison but I would still like you thoughts on what to choose or just stay with WebForms view engine for now?

    Read the article

  • Custom Model binder not firing

    - by mare
    This is my custom model binder. I have my breakpoint set at BindModel but does not get fired with this controller action: public ActionResult Create(TabGroup tabGroup) ... public class BaseContentObjectCommonPropertiesBinder : DefaultModelBinder { public new object BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext) { if (controllerContext == null) { throw new ArgumentNullException("controllerContext"); } if (bindingContext == null) { throw new ArgumentNullException("bindingContext"); } BaseContentObject obj = (BaseContentObject)base.BindModel(controllerContext, bindingContext); obj.Modified = DateTime.Now; obj.Created = DateTime.Now; obj.ModifiedBy = obj.CreatedBy = controllerContext.HttpContext.User.Identity.Name; return obj; } My registration: // tried both of these two lines ModelBinders.Binders[typeof(TabGroup)] = new BaseContentObjectCommonPropertiesBinder(); ModelBinders.Binders.Add(typeof(TabGroup), new BaseContentObjectCommonPropertiesBinder());

    Read the article

  • Custom DataAnnotation attribute with datastore access in ASP.NET MVC 2

    - by mare
    I have my application designed with Repository pattern implemented and my code prepared for optional dependency injection in future, if we need to support another datastore. I want to create a custom validation attribute for my content objects. This attribute should perform some kind of datastore lookup. For instance, I need my content to have unique slugs. To check if a Slug already exist, I want to use custom DataAnnotation attribute in my Base content object (instead of manually checking if a slug exists each time in my controller's Insert actions). Attribute logic would do the validation. So far I have come up with this: public class UniqueSlugAttribute : ValidationAttribute { private readonly IContentRepository _repository; public UniqueSlugAttribute(ContentType contentType) { _repository = new XmlContentRepository(contentType); } public override bool IsValid(object value) { if (string.IsNullOrWhiteSpace(value.ToString())) { return false; } string slug = value.ToString(); if(_repository.IsUniqueSlug(slug)) return true; return false; } } part of my Base content class: ... [DataMember] public ContentType ContentType1 { get; set; } [DataMember] [Required(ErrorMessageResourceType = typeof (Localize), ErrorMessageResourceName = "Validation_SlugIsBlank")] [UniqueSlug(ContentType1)] public string Slug { get { return _slug; } set { if (!string.IsNullOrEmpty(value)) _slug = Utility.RemoveIllegalCharacters(value); } } ... There's an error in line [UniqueSlug(ContentType1)] saying: "An attribute argument must be a constant expression, typeof expression or array creation expression of an attribute parameter type." Let me explain that I need to provide the ContentType1 parameter to the Constructor of UniqueSlug class because I use it in my data provider. It is actually the same error that appears if you try do to this on the built-in Required attribute: [Required(ErrorMessageResourceType = typeof (Localize), ErrorMessageResourceName = Resources.Localize.SlugRequired] It does not allow us to set it to dynamic content. In the first case ContentType1 gets known at runtime, in the second case the Resources.Localize.SlugRequired also gets known at runtime (because the Culture settings are assigned at runtime). This is really annoying and makes so many things and implementation scenarios impossible. So, my first question is, how to get rid of this error? The second question I have, is whether you think that I should redesign my validation code in any way?

    Read the article

  • Custom ViewEngine problem with ASP.NET MVC

    - by mare
    In this question jfar answered with his solution the problem is it does not work for me. In the method FindView() I have to somehow check if the View we are requesting is a ViewUserControl. Because otherwise I get an error saying: "A master name cannot be specified when the view is a ViewUserControl." This is my custom view engine code right now: public class PendingViewEngine : VirtualPathProviderViewEngine { public PendingViewEngine() { // This is where we tell MVC where to look for our files. /* {0} = view name or master page name * {1} = controller name */ MasterLocationFormats = new[] {"~/Views/Shared/{0}.master", "~/Views/{0}.master"}; ViewLocationFormats = new[] { "~/Views/{1}/{0}.aspx", "~/Views/Shared/{0}.aspx", "~/Views/Shared/{0}.ascx", "~/Views/{1}/{0}.ascx" }; PartialViewLocationFormats = new[] {"~/Views/{1}/{0}.ascx", "~/Views/Shared/{0}.ascx"}; } protected override IView CreatePartialView(ControllerContext controllerContext, string partialPath) { return new WebFormView(partialPath, ""); } protected override IView CreateView(ControllerContext controllerContext, string viewPath, string masterPath) { return new WebFormView(viewPath, masterPath); } public override ViewEngineResult FindView(ControllerContext controllerContext, string viewName, string masterName, bool useCache) { if (controllerContext.HttpContext.Request.IsAjaxRequest()) return base.FindView(controllerContext, viewName, "Modal", useCache); return base.FindView(controllerContext, viewName, "Site", useCache); } } The above ViewEngine fails on calls like this: <% Html.RenderAction("Display", "WidgetZoneV2", new { zoneslug = "left-default-zone" }); %> As you can see, I am providing Route values to my RenderAction call. The action I am rendering here is this: // Widget zone name is unique // GET: /WidgetZoneV2/{zoneslug} public ActionResult Display(string zoneslug) { zoneslug = Utility.RemoveIllegalCharacters(zoneslug); // Displaying widget zone creates new widget zone if it does not exist yet; so it prepares our page for // dropping of content widgets WidgetZone zone; if (!_repository.IsUniqueSlug(zoneslug)) zone = (WidgetZone) _repository.GetInstance(zoneslug); else { // replace slug with spaces to convert it into Title zone = new WidgetZone {Slug = zoneslug, Title = zoneslug.Replace('-', ' '), WidgetsList = new ContentList()}; _repository.Insert(zone); } ViewData["ContentItemsList"] = _repository.GetContentItems(); return View("WidgetZoneV2", zone); } I cannot use RenderPartial (at least I don't know how) the way I can RenderAction. To my knowledge there is no way to provide RouteValueDictionary to RenderPartial() like the way you can to RenderAction().

    Read the article

  • Some questions about slugs in ASP.NET MVC content system

    - by mare
    In my application I'm currently using forms which allow to enter Title and Slug fields. Now I've been struggling with the slugs thing for a while because I can never decide once and for all how to handle them. 1) Make Title and Slug indenpendent Should I allow users to enter both Title and Slug separetely? This is what I had first. I also had an option that if user did not enter the Slug it was derived from the Title. If both were enter, the Slug field took precedence. 2) Derive Slug from Title, when content is inserted that's it for the Slug, no more changes Then, I switched to only Title field and derive Slug from title. While doing it I found out that now I have to change all the forms that allowed user to enter a slug. This way of doing it also prevents users to change Slugs - they can change the Title but it has no effect on the Slug. You can think of it like Slug is uniqued ID. 3) Now I'm thinking again of allowing users to change slug Though I don't think it is all that useful. How many times does the content that someone already added, spent time on writing it, even require a change of either Title or slug? I don't think it is that many times. The biggest problem with the 3rd option is that If I use Slugs as IDs, I need to update the reference all over the place when Slug changes. Or maintain a table that would contain somekind of Slug history. What are you thoughts on these, I hope, valid questions?

    Read the article

  • How to check if returning View is of type PartialViewResult or a ViewUserControl

    - by mare
    In the method FindView() I have to somehow check if the View we are requesting is a ViewUserControl. Because otherwise I get an error saying: "A master name cannot be specified when the view is a ViewUserControl." This is my custom view engine code right now: public class PendingViewEngine : VirtualPathProviderViewEngine { public PendingViewEngine() { // This is where we tell MVC where to look for our files. /* {0} = view name or master page name * {1} = controller name */ MasterLocationFormats = new[] {"~/Views/Shared/{0}.master", "~/Views/{0}.master"}; ViewLocationFormats = new[] { "~/Views/{1}/{0}.aspx", "~/Views/Shared/{0}.aspx", "~/Views/Shared/{0}.ascx", "~/Views/{1}/{0}.ascx" }; PartialViewLocationFormats = new[] {"~/Views/{1}/{0}.ascx", "~/Views/Shared/{0}.ascx"}; } protected override IView CreatePartialView(ControllerContext controllerContext, string partialPath) { return new WebFormView(partialPath, ""); } protected override IView CreateView(ControllerContext controllerContext, string viewPath, string masterPath) { return new WebFormView(viewPath, masterPath); // this line produces the error because we cannot set master page on ASCXs, so I need an "if" here } public override ViewEngineResult FindView(ControllerContext controllerContext, string viewName, string masterName, bool useCache) { if (controllerContext.HttpContext.Request.IsAjaxRequest()) return base.FindView(controllerContext, viewName, "Modal", useCache); return base.FindView(controllerContext, viewName, "Site", useCache); } } The above ViewEngine fails on calls like this: <% Html.RenderAction("Display", "MyController", new { zoneslug = "some-zone-slug" });%> The action I am rendering here is this: public ActionResult Display(string zoneslug) { WidgetZone zone; if (!_repository.IsUniqueSlug(zoneslug)) zone = (WidgetZone) _repository.GetInstance(zoneslug); else { // do something here } // WidgetZone used here is WidgetZone.ascx, so a partial return View("WidgetZone", zone); } I cannot use RenderPartial because you cannot send route values to RenderPartial the way you can to RenderAction. To my knowledge there is no way to provide RouteValueDictionary to RenderPartial() like the way you can to RenderAction().

    Read the article

  • suggestions for Membership in ASP.NET MVC application

    - by mare
    With this question I am mostly looking for answers from people that have implemented the out-of-the-box ASP.NET membership in their own database - I've set up the tables inside my database and as far as I can see they contain mostly what I need but not everything. I will have the notion of a Firm (Company) to which Users will belong so I will have to associate the aspnet_Users with my Firms table (each user will be a member of exactly one firm). If possible, provide some guidelines how did you do it and what I might run into if I have to modify the table design at some point in the future. Preferably I will be using the default Membership provider. I am having trouble to decide whether to go from scratch or use what ASP.NET already offers.

    Read the article

  • Parsing third-party XML

    - by mare
    What path would you took to parse a large XML file (2MB - 20 MB or more), that does not have a schema (I cannot infer one with XSD.exe because the file structure is odd, check the snippet below)? Options 1) XML Deserialization (but as said, I don't have a schema and XSD tool complains about the file contents), 2) Linq to XML, 3) loading into XmlDocument, 4) Manual parsing with XmlReader & stuff. This is XML file snippet: <?xml version="1.0" encoding="utf-8"?> <xmlData date="29.04.2010 12:09:13"> <Table> <ident>079186</ident> <stock>0</stock> <pricewotax>33.94000000</pricewotax> <discountpercent>0.00000000</discountpercent> </Table> <Table> <ident>079190</ident> <stock>1</stock> <pricewotax>10.50000000</pricewotax> <discountpercent>0.00000000</discountpercent> <pricebyquantity> <Table> <quantity>5</quantity> <pricewotax>10.00000000</pricewotax> <discountpercent>0.00000000</discountpercent> </Table> <Table> <quantity>8</quantity> <pricewotax>9.00000000</pricewotax> <discountpercent>0.00000000</discountpercent> </Table> </pricebyquantity> </Table> </xmlData>

    Read the article

  • ASP.NET MVC TextBoxFor helper rendering empty when null

    - by mare
    I noticed that TextBoxFor helper renders empty if there is no model, like for instance when I have a CreateEdit ViewUserControl. When in Edit view fields are filled in, when in Create fields are empty but still rendered. The problem is TextBoxFor does not accept different Id for its name (the same as LabelFor and others, but for LabelFor I have custom Html helpers). So in some case we still have to use regular Html.TextBox helper. The problem is if I write this <%=Html.TextBox("postname", Model.PostCode.postname, new { @class = "postsDropDown" })%> an error occurs in Create view (obviously). So I have to do this: <% if (Model != null) %> <%=Html.TextBox("postname", Model.PostCode.postname, new { @class = "postsDropDown" })%> <% else %> <%=Html.TextBox("postname", null, new { @class = "postsDropDown" })%> Now that is something which I don't like anymore (the IF's). Is this the only way to do it? I know I could extend TextBoxFor helpers also but seems like so much trouble. In the end we will come to extending all of the "For" helpers but I think this should be done by ASP.NET MVC team already (built-in).

    Read the article

  • Double.TryParse() input decimal separator different than system decimal separator

    - by mare
    I have a source XML that uses a dot (".") as a decimal separator and I am parsing this on a system that uses a comma (",") as a decimal separator. As a result, value of 0.7 gets parsed with Double.TryParse or Double.Parse as 7000000. What are my options to parse correctly? One of them is to replace dots in source with commas with String.Replace('.', ',') but I don't think I like this very much.

    Read the article

  • What are the preferred versions of Vim and Emacs on Mac OS X?

    - by Michiel de Mare
    For those of us that like to use the graphical version of Vim or Emacs, instead of the console version, which version do you recommend? For Vim, there's Mac OS X Vim, MacVim, Vim-Cocoa. For Emacs, CarbonEmacs, XEmacs, and Aquamacs. Are there more? Which of these are ready for prime-time? If it's a tough call, what are the trade-offs? Are all of these still being maintained? No discussion of Vim vs. Emacs, if you don't mind, or comparisons with other editors.

    Read the article

  • PRG in ASP.NET MVC but with object data transferred to the redirected action

    - by mare
    Following Post-Redirect-Get pattern as described in various spots but maybe in most detail here by Stephen Walter I want to use RedirectToAction but it does not accept a parameter for sending object to it. I can only send route values either as an object or as an RouteValueDictionary. So currently I send object ID and type and pull the object out of the datastore again in the action to which I redirected (like Results). // redirect to confirm view return RedirectToAction("ChangeSuccess", "Redirect", new { slug = tabgroup.Slug, contentType = tabgroup.ContentType }); But I would like to send an object there because I already have it in my updating controller action so I don't need to pull it out again. Is that possible somehow?

    Read the article

  • .NET Framework 4 RTM on Windows server 2008 R2

    - by mare
    I've just installed .NET 4 on Windows SErver 2008 R2 x64 and I am getting 500 Internal Server Error with an ASP.NET MVC application which was previously running fine on 3.5. The application was upgraded from targeting 3.5 to target 4 and I personally built it today on my development machine (changed in VS - Properties to .NET Framework 4). On the server I installed .NET Framework 4 Client profile and Full both automatically through the Web Platform Installer. ASP.NET MVC 2 was also installed through Platform Installer. I created a new .NET 4 application pool in IIS and placed the web app in it. Also I have custom errors turned Off in web.config but even so no detailed error is displayed - just the plain IIS 7.5 500 Internal Server Error. Any suggestions?

    Read the article

  • ASP.NET MVC The new ActionLink with MvcHtmlString and request URL generated

    - by mare
    This piece of code used to work in MVC 1 but it does not since I upgraded to MVC 2: <%=Html.ActionLink(Resources.Localize.Routes_WidgetsCreate, "Create" + "?modal=true", "Widget", null, new { rel = "shadowbox;height=600;width=700", title = Resources.Localize.Routes_WidgetsCreate })%> I am aware it has something to do with the way ActionLink encodes things, so the result that comes out is something like this: "http://localhost:53704/Widget/Create%3fmodal%3dtrue" The problem is, when clicked, the Shadowbox modal opens up and inside, where the request View should be rendered is this exception: Server Error in '/' Application. A potentially dangerous Request.Path value was detected from the client (?). What can I do to get past that? Do you recommend another way of sending params to the view besides in QueryString (in this case I need "modal" because in the view I select CSS styles based on whether we are rendering modal or not)?

    Read the article

  • jquery Tab group IDs

    - by mare
    I'm having an issue with jQuery UI Tabs script which does not pick up tabs that have a dot "." in their name (ID). For instance like this: <script type="text/javascript"> $(function () { $("#tabgroup\\.services").tabs(); }); </script> <div id="tabgroup.Services"> <ul> <li><a href="#tab.service1"> Service 1 title</a></li> <li><a href="#tab.service2"> Service 2 title</a></li> </ul> <div id="tab.service1"> <p>content</p> </div> <div id="tab.service2"> <p>content</p> </div> </div> The problem is because to select an element with a dot in its name, you need to use escapes (like when I initialize the tabs on my tabgroup). And apparently the Tabs JS implementation does not do that. Although I can do it at the tab group level, I cannot do it lower down because that's implemented in the Tabs JS file and I would not want to modify it (if possible).

    Read the article

  • jQuery Tabs remove icon

    - by mare
    Using jQuery Tabs script with an icon to remove the tab but this code renders differntly in IE8 and Firefox 3.6.2. The problem is that Firefox wraps the tab and puts "X" signs in new row, whicle IE correctly renders it in the same row (but not centered vertically as it should but rather in the top right corner - which is still better than Firefox behaviour). I have spent the last hour trying to find out if the problems lies in CSS (both with Firebug and IE's Developer Toolbar) but there is nothing special in CSS, just the default jQuery Flick UI CSS. <div id="tabgroup.<%= Model.Slug %>"> <ul> <% foreach (ContentListItem tab in Model.Contains) {%> <li><a href="#tab\.<%=tab.Slug%>"> <%=tab.Title%></a><% if (Context.User.IsInRole("Administrators")) { %><span class="ui-icon ui-icon-close"><%=Resources.Localize.Routes_TabDelete %></span><% } %> </li> <% }%> </ul> <% foreach (ContentListItem tab in Model.Contains) { Html.RenderAction("Display", "Tab", new { slug = tab.Slug }); }%> </div> Please disregard the stuff about ASP.NET MVC code...

    Read the article

1 2 3  | Next Page >