Hi,
ok, I solved the issue with the following code, and it works!
====== .aspx file
...
<tr>
<td>Insert a word</td>
<td><asp:TextBox ID="TE_Word" runat="server"
Width="160px"></asp:TextBox></td>
<td><span id="resultText"></span></td>
<td><input type="button" ID="BT_Invia" value="invia"
onclick="strToUppercase()" /></td>
</tr>
====== script
function strToUppercase()
{
var textBox = document.getElementById('TE_Word');
Matteo.Web.AtlasMusicArchiver.Admin.Prova.StrToUppercase(textBox.value,strToUppercase_callback);
}
function strToUppercase_callback(res)
{
if (res.error != null)
{
alert(res.error);
return;
}
//alert(res.value);
printDiv('resultText',res);
}
//DIV or SPAN tag...
function printDiv(theDiv,theAjaxResponse)
{
var resultDiv = document.getElementById(theDiv);
if (resultDiv.firstChild)
resultDiv.removeChild(resultDiv.firstChild);
resultDiv.appendChild(document.createTextNode(theAjaxResponse.value));
}
====== /script
then...
====== .cs
[AjaxPro.AjaxMethod]
public string StrToUppercase(string myString)
{
string _result = myString.ToUpper(); // sorry, I forgot the method
ToUpper() last time
return _result;
}
well, very simple after all... after your help, and after I understood
it!
thank you again, bye
interpeo
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ajax.NET Professional" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/ajaxpro
The latest downloads of Ajax.NET Professional can be found at
http://www.ajaxpro.info
-~----------~----~----~----~------~----~------~--~---