Showing posts with label havent. Show all posts
Showing posts with label havent. Show all posts

Monday, March 26, 2012

How do i change the source code for an extender?

Hi all,

I have searched the forums, documentation and google but haven't found any help yet (mayby i'm searching for the wrong things). I need to modify ModalPopupExtender and have found the code i need to modify in the ModalPopupBehaviour.js but how can i change that code so that everytime i use a modalopupextender in my project it uses my modified extender. I'm guessing that i have to build it/something again but is it the cs project that i got when i downloaded the toolkit?

Could someone point me in the right direction mayby there is some kind og guide or how to that i haven't found. Or explain what i need to do.

Lot's of thanks!

Thought i'd explain what i wan't to achive.

In the modalpopupbeahvoiur code this code creates the background div: 
this._backgroundElement = document.createElement('div');this._backgroundElement.style.display ='none';this._backgroundElement.style.position ='fixed';this._backgroundElement.style.left ='0px';this._backgroundElement.style.top ='0px';// Want zIndex to big enough that the background sits above everything else // CSS 2.1 defines no bounds for the <integer> type, so pick arbitrarilythis._backgroundElement.style.zIndex = 10000;if (this._BackgroundCssClass) {this._backgroundElement.className =this._BackgroundCssClass; }

I want to attach an onclick animation so that if a user clicks the background div then the modalpopup itsel should pulse. I thought of changing the above javascript code so that the div also got an id to witch i could attach the animation extender. But i don't know how to make my changes to the javascript code reflect in my project (see original post).

Is there perhaps an other way to create this animation? It should be somethink like if you bring up IE's properties window and click somewhere outside of it then the header flasehs.

Thanks again


I've shown how to modify the Javascript in an existing extender (in this case the ListSearch extender, to speed it up with massive lists) here:

http://damianblog.com/2007/06/19/speeding-up-listsearchextender/

You should be able to do the same kind of think with your changes to the ModalPopup. The key is to ensure that your web project references the newly build toolkit DLL.

Damian


Thanks! I'll check that out and get back when I get it to work! :)


I got it to work and thanks for your reply!

If anyone else wonders or reads this what i needed to do was to open the project file that was in the toolkit catalog and make my changes in the .js file then rebuild the project and make sure that my project (where I needed to use the changed extenders/behaviors) referenced to that newly build toolkit DLL in the toolkit bin debug or release folder.

/peronn

Saturday, March 24, 2012

how difficult is it to retrofit a webapp with the ajax toolkit

Hi folks, haven't posted in any of the ajax forums before in fact I haven't used the toolkit or the ajax framework extensions for asp.net at all. All my ajax to this data has been regular javascript functions. Anyhow for the current web app I'm building I really want to pull out all the stops for the client so was consdering using some toolkit controls namely collapsible panel, calendar and autocomplete. However my app is about 50% complete and i want to finizle the core functionality of it before getting down with ajax so I'm wondering how easy or difficult is it to retrofit a webapp with controls from the toolkit. Am I better of stopping right now and implemented the ajax controls or do I need to start form sratch? or can I simply tweaks a few things to make ajax controls work when I 99% done with CS code behind stuff.

Thanks for your thoughts.

The quickly you convert your website to ASP.NET AJAX website the better. Toolkit controls are really easy to use, but if you are planning to use lot of update panels then u might to change your aspx pages a bit so if you are thinking about moving to AJAX website you should do so as quickly as possible.

And to convert your website, all you have to do is change your web.config file. Generate one blank ASP.NET AJAX enabled website through VS and copy the content of web.config file to your current web.config file at appropriate places.

Hope it helps.


I'd start implementing the AJAX control now if you've decided that's the route you want to take. Thisdocumentation will help you get started.


Thanks guy, I really don't want to have to delve into ajax yet if at all avoidable. I will basically needed two or three controls thats all. 2 collapable panels and autocomplete (calendar I can live without). I'm putting together an advanced fine panel at the moment, with textboxes checkboxes etc. I will be wanting to move that from a regular panel to a collapable panel, thats all. Will even this be a pain in the neck to retrofit?


You'll still have to go through all of the conversion process regardless of how many controls you choose to use.