Search

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

Matching Posts

  • Re: Mocking HTTPContext object

    @radmanmm : Brilliant stuff, I have been looking for this all day! Did you write this? I used your GetMockHttpState() with Phil Haack's SimulatedHttpRequest to create an HttpContext facade which can be used safely from unit tests where there is no web context. Mucho kudos!
    Posted to Free For All (Forum) by zootius on 6/30/2009
  • Re: WebMethod returns undefined, yet return value in response?

    The documentation is pretty poor IMO so this caused me confusion too. Let's say you have a WebMethod defined like so: [WebMethod] public string HelloWorld() { return "Hello World" ; } You would expect to call this with something like: alert(PageMethods.HelloWorld()); However, this is NOT correct. The "HelloWorld" javascript function that Ajax.Net creates actually adds a "callback function" argument. So to call it you need to do something like this instead: function
    Posted to Client Side Web Development (Forum) by zootius on 7/5/2007
    Filed under: invoke client script ajax call
  • Re: User Control z-Index Catch-22

    Ah, the problem is that I wanted to eventually distribute this control so people will use it in their own applications, where I have no control how they implement it. So I wanted it to work without them having to manually place it at the end of their page, especially as the popup control generates an html "Launch" link for which the user will want to control placement.
    Posted to Client Side Web Development (Forum) by zootius on 4/30/2007
  • Re: User Control z-Index Catch-22

    Well, I couldn't wait so had to come up with a quick solution, which was to use Javascript DOM manipulation to move the popup from its default rendering position, to become the last control on the Form. The code to do this was: var elemPopup = $('< %= pnlPopup.ClientID %>'); elemPopup.parentNode.removeChild(elemPopup); document.forms[0].appendChild(elemPopup); Even though this fixed the problem, I'd still like to know if anyone knows a way to do this server-side. Or is it impossible for a child
    Posted to Client Side Web Development (Forum) by zootius on 4/30/2007
  • Re: User Control z-Index Catch-22

    Okay, stick the following code into a blank web form: < div id= "elemMain" style= "width: 600px; height: 600px; border: solid 1px black; background-color: #aaa;" > < div id= "elemBlue" style= "width: 100px; height: 100px; position:absolute; top: 50px; left: 50px; border: solid 1px #00a; background-color: #aaf;" > < div id= "elemTarget" style= "z-index:10; top: 40px; left: 30px; position:absolute; border: solid 1px green; background-color: #afa;" > TARGET </ div > </ div
    Posted to Client Side Web Development (Forum) by zootius on 4/30/2007
  • User Control z-Index Catch-22

    Hi folks - been banging my head against a problem and just can't seem to solve it. You'll probably need to understand a bit about z-Index stacking contexts to help me out. I created a funky popup menu control that appears at the mouse pointer location on mouseclick. To implement my control on an ASPX page, the user just puts my tag into their ASPX/ASCX code. At the server side, my control is then rendered at that point of the HTML as a hidden, absolutely positioned DIV with a massive z-Index. On
    Posted to Client Side Web Development (Forum) by zootius on 4/27/2007
  • Re: Modal Popup - on show

    Jason's right. Took me a while to realise this too, but Ajax.Net registers some new client-side event handlers, so if you have a javascript function called pageLoad(), it gets called automatically after Ajax.net has finished doing its own onLoad stuff. More info here: http://ajax.asp.net/docs/overview/AJAXClientEvents.aspx
    Posted to ASP.NET AJAX Control Toolkit (Forum) by zootius on 4/11/2007
  • Re: ModalPopup Client-Side Reference

    Yeah! That works a treat, thanks. I now just do : Sys.Application.add_load(jsBindToModal); Thanks to Phanatic for the tip on pageLoad() too - however the prob with that is that I may have multiple controls trying to override pageLoad() for their own purposes, which wouldn't work as only the last one defined would run. I needed to be able to add multiple handlers.
    Posted to ASP.NET AJAX Control Toolkit (Forum) by zootius on 4/10/2007
  • Re: javascript at specific position in update panel doesn't work after postback

    Couple of things for you to do: 1. As you know, ordinary <script> blocks won't get processed on the async callback, so you have to use the ScriptManager's methods to register your script, e.g. ScriptManager.RegisterStartupScript( this .Page, this .GetType(), "MyCallbackScriptHandle" , " swftopage( 'ajaxFlash' , '550' , '400' , 'id=" + DateTime.Now.Millisecond.ToString() + "' ) " , true ); 2. You should abandon the clientscript document.write() approach in your swftopage function. Instead, use
    Posted to ASP.NET AJAX UI (Forum) by zootius on 4/5/2007
  • ModalPopup Client-Side Reference

    I want to use the ModalPopupExtender's client-side "add_Shown()" function to register a javascript function to run on client-side modal display. The problem I have is that searching the DOM for the ModalPopupExtender on Page Load is not working, i.e. $find('Modal_Popup_Extender_Behavior'). However, if I do a half-second delay after window.load, it works: // Hook our jsOnPageLoad function onto the Page's OnLoad handler Sys.UI.DomEvent.addHandler(window, 'load' , jsOnPageLoad); // Run this when Page
    Posted to ASP.NET AJAX Control Toolkit (Forum) by zootius on 4/5/2007
    Filed under: ModalPopup, ModalPopupExtender
Page 1 of 2 (20 items) 1 2 Next >