Showing posts with label point. Show all posts
Showing posts with label point. 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.

Saturday, March 24, 2012

Exception Handling?

It looks like there's no handling for server side errors at this point at least for the Web Service behavior. If I do the following:

[WebMethod]

publicbusCustomer GetCustomer()

{

thrownewSoapException("Failure dude!",SoapException.ServerFaultCode);

returnnewbusCustomer();

}
The call simply doesn't complete to any of the callbacks. Is there anyway to get any error info out of this? It seems to me that the result values should either include some sort of complex object that contain a reference to an error object or else provide some sort of other mechanism that notifies you of an error. Instead of a Timeout method, maybe there should be a more general Error method with an error object you can query for what type of error occurred on the server.

Hello

Try this on the client side javascript:

function displayTimeout(result)

{

alert('timeout:\n' + result);

}

function dispalyError(result)

{

alert('error:\n' + result);

}

function callMyWebservice()

{

GetCustomer(CallbackMethod,displayTimeout,displayError);

}

You can also use Fiddler to view the data returned from the Webservice. (www.fiddlertool.com)


Hi,

following the suggestion given by donaldduck1312, you have to declare an error callback for the asynchronous request. When the callback is invoked, you receive a Web.Net.MethodRequestError instance as the first parameter; this object has methods that allow to display infos about the error:

function onError(e) {
alert('Server Error: ' +
e.get_exceptionType() + '\r\n' +
'Message: ' +
e.get_message() + '\r\n' +
'Stack Trace: ' +
e.get_stackTrace());
}