|
There is anything -- jmgp --
Against brazillians or my question is a stupid one??? I'm thinking that the problem is on my side, but why don't ask??? The problem is: I move my developing efforts to Net 2.0 and do as AjaxPro.Info webusercontrol examples (code below): Partial Class controles_BoxFavorito Inherits System.Web.UI.UserControl Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load AjaxPro.Utility.RegisterTypeForAjax(GetType(controles_BoxFavorito), Me.Page) 'DO OTHER THINGS End Sub 'And add dummy function to this webuser control just for test purposes: <AjaxPro.AjaxMethod()> _ Public Function teste(ByVal str As String) As String teste = str End Function End Class I got the line below in my javascript AjaxPro startup statements: <script type="text/javascript" src="/mgxion.atlas/ajaxpro/controles_BoxFavorito,App_Web_t0robbiu.ashx"></script> But in Fiddler I see that the content of the request to "/mgxion.atlas/ajaxpro/controles_BoxFavorito,App_Web_t0robbiu.ash" is returning zero length, in other words it's not emitting my functions in server to the client code. Am I doing something wrong??? In aspx files I could get right responses from the library but not in webusercontrols. The web.config seens to be Ok, my Ajax functions in aspx files working great with light speed ;-). Thanks in advance for any reply, Regards from Brasil John |
|
-- Douglas --
Põe o Return no final da função senão ela não retornará nada. Ex.: <AjaxPro.AjaxMethod()> _ Public Function teste(ByVal str As String) As String teste = str Return teste End Function |
|
-- jmgp --
Não funcionou e a porra do Fiddler quase fudeu meu servidor web.... Return é palavra reservada do C# no VB se atribui o nome da função ao valor que se quer retornar, funciona perfeito no NET 1.1, mas no 2.0 não consegui expor os métodos ajax através de webusercontrol.... Don't works and the f&¨$¨&$¨#& Fiddler almost crack up my web server.... Return is a C# reserved word, in VB you point the function name to the value you want returnst. Everything works great in .Net 1.1 but 2.0 I could not expose my ajax methods to the client with webuser controls.... Bad, bad... |