View Full Version : AjaxEvent Parameters in a server-side sub

Jan 21, 2010, 12:32 PM
Hi everyone,

I was asking myself if it's possible, in the following scene:

<ext:Button runat="server" ID="btnOk" Text="Open">
<Click OnEvent="btnOpenFile_Click" IsUpload="True">
<ext:Parameter Name="theName" Value='<%#Eval("Nome")%>' Mode="Raw" />
<ext:Parameter Name="theExtension" Value='<%#Eval("Estensione")%>' Mode="Raw" />

to use the parameters ("theName" &amp; "theExtension") within the server-side sub "btnOpenFile_Click" (and not in a web Service).

Thank You.

Jan 22, 2010, 2:43 AM
Hi unaltro2,

Do things work properly if you set AutoDataBind="true" on each <ext:Parameter>?


<ext:Parameter Name="theName" Value='<%#Eval("Nome")%>' Mode="Raw" AutoDataBind="true" />

Hope this helps.

Jan 22, 2010, 4:06 AM

if I put a different string on the Value parameter (for example Value="Hello"), all works perfect and, on the server-side, i'm really able to obtain the "Hello" string.

But, as I can see, it's not possible to use an AjaxEvent (with its extraparam auto binded), for example, in the button control dinamically generated by an Asp.Net ListView ItemTemplate.

Do it miss something?

Thanks for the help.