unable to obtain extraparams from a button ajaxEvent (0.8.2) inside Asp.Net itemTemplate

  1. #1

    obtain extraparams from a button ajaxEvent

    Hello,

    I'm unable to obtain extraparams values from an AjaxEvent fired from a button click event.

    The button is inside a Asp.Net ListView itemTemplate,

    and the value i'd like to pass on server-side is embedded dinamically with the 'Eval' function.

    I'm able to pass every kind of string but this is not what i would.

    easiest markup:
                                     <asp:ListView 
                                   ID="ListViewDoc_Richieste" 
                                   GroupItemCount="16" 
                                   runat="server" 
                                   DataKeyNames="ID" 
                                   DataSourceID="objectDataSource_Richieste_Doc" >    <------------ returns 'Name' and 'Estensione' values                              
                                                                 
                                   <LayoutTemplate>
                                      <asp:Placeholder
                                        id="GroupPlaceholder"
                                        runat="server" />
                                   </LayoutTemplate>
                                      
                                   <GroupTemplate>
                                      <div>
                                         <asp:Placeholder id="ItemPlaceholder" runat="server" />
                                      </div>
                                   </GroupTemplate>
                                      
                                   <ItemTemplate>   
                                      <asp:UpdatePanel ID="updatePanelDocsRichieste_Documenti" runat="Server">
                                          <ContentTemplate >         
                                                                             
                                               <ext:Button runat="server" ID="btnOpen" Text='<%# Eval("Nome").trim() + "." + Eval("Estensione").tolower.trim() %>' > 
                                                  <AjaxEvents >
                                                     <Click OnEvent="btnOpenFile" IsUpload="True" Before="Ext.Msg.wait('Waiting...', 'Downloading...');" Failure="Ext.Msg.show({title:'Download Error', msg:result.errorMessage, buttons: Ext.Msg.OK, icon:Ext.MessageBox.ERROR});">
                                                       <EventMask ShowMask="true" MinDelay="500" Msg="Please wait..."   />
                                                       <Confirmation  ConfirmRequest="true"  Title='<%# Eval("Nome") %>' Message="Do you wish to open selected doc?"></Confirmation>               
                                                       <ExtraParams>
                                                          <ext:Parameter Name="myName" Value='<%# Eval("Nome").tostring.trim %>' ></ext:Parameter>
                                                          <ext:Parameter Name="myExtension" Value='<%# Eval("Estensione") %>'  ></ext:Parameter>
                                                       </ExtraParams>
                                                     </Click>                                                                                            
                                                  </AjaxEvents>
                                               </ext:Button>     
                                                                                                                                               
                                          </ContentTemplate> 
                                      </asp:UpdatePanel> 
                                   </ItemTemplate>
                                  
                                  </asp:ListView>
    server-side:
     Protected Sub btnOpenFile(ByVal sender As Object, ByVal e As AjaxEventArgs)        
            Dim _estensione As String = e.ExtraParams("myExtension")   <------------------------------------- is returned an empty string!!!!!!!!!!!!!!!!!!!!!
            Dim _nome As String = e.ExtraParams("myName")   <------------------------------------- is returned an empty string!!!!!!!!!!!!!!!!!!!!!

    I guess the issue is on extraparams;in this case what else property i need to set on the ajaxEvent?

    Thanks a lot.

    Fabio.
    Last edited by unaltro2; Apr 14, 2011 at 5:43 PM.
  2. #2
    So, anyone could tell me if either i am going out of head
    or the code could be correct?

Similar Threads

  1. Replies: 5
    Last Post: Apr 28, 2012, 5:21 AM
  2. Still unable to make login button as default button
    By santhu12smart in forum 1.x Help
    Replies: 3
    Last Post: Oct 05, 2011, 8:13 AM
  3. Replies: 16
    Last Post: May 19, 2010, 10:58 AM
  4. [CLOSED] unable to render pdf inside viewport
    By yobnet in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Apr 19, 2010, 2:29 PM
  5. Replies: 3
    Last Post: Mar 29, 2010, 4:25 AM

Tags for this Thread

Posting Permissions