Showing posts with label include. Show all posts
Showing posts with label include. Show all posts

Wednesday, March 28, 2012

Extending The AJAX Toolkit to Include a Formview Ctrl

I was wondering if someone had already tackled and/or point me to a complete listing of the Formview class

I'm not clear on your question. Are you looking for the server-side Formview control to be client-enabled in some way? What features are you looking for?


I am looking to create or find a server side FormView Control that is AJAX enabled.


The feature I would like to integrate is a HTML Editor. Either using TinyMCE or FCKEditor, or FreeTextBox or to create my own ASP.NET assembly, (dll), as none do exactly what I want, although Tiny and JavaScript seem the closest.

Then within the Edit Template of the FormView Control I would integrate the two controls...? Perhaps, there is another, better way, that I hadn't thought of?

I like the FormView Control and think it has the potential to become a templating engine, but I need a way to store line breaks in particular to MSSQL, as font specs, positioning, etc are handled within external stylesheet...?

A poor mans Content Mgmt System, if you will?

So I am, looking for the original source, class, of the FormView; to better understand, if not re-implement with an Editor embedded within...?


AFAIK, noone's done precisely what you're looking for, then, no. The editor piece, as you've pointed out, has been tried in a few places, and most are good or at least 'ok', and it's also not that hard to roll your own (I've even done my own, though it's not as powerful as FCKEditor or the like, it at least is 'packaged' as a control and works in Opera which FreeTextBox doesn't, afaik). The rest sounds like implementation-specific business logic to me, which you'd have to roll on your own anyway.

Extender with inclusion of JS files in particular order.

Right now I'm working on an extender that needs to include numerous .js files I'd like to register for inclusion on a page.

I've added:

[assembly: System.Web.UI.

WebResource("first.js","text/javascript")]

[assembly: System.Web.UI.

WebResource("second.js","text/javascript")]

In the root of the Extender.cs class... as well as...

[ClientScriptResource("first","first.js")]

[

ClientScriptResource("second","second.js")]

Seems like if it were just one of the scripts by itslef it seems to do an ok job... but for scrips that rely on eachother, the straight up fail. Is the extender model only destined to have one script file period? If not, are scripts loaded and rendered in the order I add the ClientScriptResource attributes?

Is there another way I SHOULD be doing this? The .js files are being bundled in as Embedded Resource which is desired functionality, however the js variables that are now supposed to be present at the document scope simply arent. Somethign strange about which scripts are being loaded, or what order they are being loaded in.

Any advice would be greatly appreciated. Thanks

ClientScriptResource also takes named parameters, of which there is a LoadOrder and you can specify a load order. I found this to be the solution to my problem. Couple small little hurdles and I should be on my way.

Saturday, March 24, 2012

exclude events

hi...

Is there anyway to exclude events from page life cycle when callBack events is occur, and include those events when postBack occur?

thank you...

Hi,

no, but you can use the IsInAsyncPostBack property of the ScriptManager to determine if a partial postback or a regular postback is running and take different actions.


hi...

thank you for your answer...

First of all, the script manager that i use plcaed in master page. so, can i say, all evets that server side controls within any update panel(in masterPage or content page) will raise, cause to IsInAsyncPostBack property to be true? and, all evets that server side controls that out of any update panel(in masterPage or content page) will raise, or, cotrols that progrematically raise callBack events will cause to IsInAsyncPostBack property to be false?

thank you...


Hi,

yes, unless the controls outside the UpdatePanel are triggers for it (in this case, IsInAsyncPostBack = true),